diff options
author | Petri Lehtinen <petri@digip.org> | 2013-09-16 08:48:54 +0300 |
---|---|---|
committer | Petri Lehtinen <petri@digip.org> | 2013-09-19 20:45:51 +0300 |
commit | c2e8fdde9d38c6fa3892e7bb37a3fc80d20e2fd4 (patch) | |
tree | 396f8af842f95d470794db0d845f4209bbfd9f63 | |
parent | bbd3b0ca4ffee0e035eb012350cf4fd3e5e3d587 (diff) | |
download | jansson-c2e8fdde9d38c6fa3892e7bb37a3fc80d20e2fd4.zip jansson-c2e8fdde9d38c6fa3892e7bb37a3fc80d20e2fd4.tar.gz jansson-c2e8fdde9d38c6fa3892e7bb37a3fc80d20e2fd4.tar.bz2 |
Mention success first in json_load_callback_t docs
-rw-r--r-- | doc/apiref.rst | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/apiref.rst b/doc/apiref.rst index 9218cf8..25260e9 100644 --- a/doc/apiref.rst +++ b/doc/apiref.rst @@ -993,9 +993,10 @@ The following functions perform the actual JSON decoding. *buffer* points to a buffer of *buflen* bytes, and *data* is the corresponding :func:`json_load_callback()` argument passed through. - On error, the function should return ``(size_t)-1`` to abort the - decoding process. When there's no data left, it should return 0 to - report that the end of input has been reached. + On success, the function should return the number of bytes read; a + returned value of 0 indicates that no data was read and that the + end of file has been reached. On error, the function should return + ``(size_t)-1`` to abort the decoding process. .. versionadded:: 2.4 |