aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPetri Lehtinen <petri@digip.org>2011-05-29 21:19:28 +0300
committerPetri Lehtinen <petri@digip.org>2011-05-29 21:27:15 +0300
commita76ba52f3450cfb3ca544f7e7f451db1578822e6 (patch)
treeb8a01683e13b2feb094ce6a503f8b8ab9a7dd645 /doc
parent9febdf333c3720e1e28811a0cd28c980444e9ad3 (diff)
downloadjansson-a76ba52f3450cfb3ca544f7e7f451db1578822e6.zip
jansson-a76ba52f3450cfb3ca544f7e7f451db1578822e6.tar.gz
jansson-a76ba52f3450cfb3ca544f7e7f451db1578822e6.tar.bz2
Add JSON_DISABLE_EOF_CHECK decoding flag
With this flag enabled, the decoder stops after a valid JSON input and thus allows extra data after it. Fixes GH-25.
Diffstat (limited to 'doc')
-rw-r--r--doc/apiref.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/apiref.rst b/doc/apiref.rst
index 6ab7a6f..48ff979 100644
--- a/doc/apiref.rst
+++ b/doc/apiref.rst
@@ -793,6 +793,15 @@ macros can be ORed together to obtain *flags*.
.. versionadded:: 2.1
+``JSON_DISABLE_EOF_CHECK``
+ By default, the decoder expects that its whole input constitutes a
+ valid JSON text, and issues an error if there's extra data after
+ the otherwise valid JSON input. With this flag enabled, the decoder
+ stops after decoding a valid JSON array or object, and thus allows
+ extra data after the JSON text.
+
+ .. versionadded:: 2.1
+
The following functions perform the actual JSON decoding.
.. function:: json_t *json_loads(const char *input, size_t flags, json_error_t *error)