diff options
author | Petri Lehtinen <petri@digip.org> | 2016-02-25 07:23:53 +0200 |
---|---|---|
committer | Petri Lehtinen <petri@digip.org> | 2016-02-25 07:23:53 +0200 |
commit | ac97e0bf796a2bfd2c3cfc28e93d5b94e4a46018 (patch) | |
tree | aff13914e8df59e09006f9119a96dc3425433162 /doc | |
parent | 1927eeb4b4d96bde8e3bb70657e8b0dc7b98244e (diff) | |
download | jansson-ac97e0bf796a2bfd2c3cfc28e93d5b94e4a46018.zip jansson-ac97e0bf796a2bfd2c3cfc28e93d5b94e4a46018.tar.gz jansson-ac97e0bf796a2bfd2c3cfc28e93d5b94e4a46018.tar.bz2 |
json_pack(): Document s?, o?, O?
Diffstat (limited to 'doc')
-rw-r--r-- | doc/apiref.rst | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/apiref.rst b/doc/apiref.rst index 39e28ca..f024408 100644 --- a/doc/apiref.rst +++ b/doc/apiref.rst @@ -1185,6 +1185,12 @@ arguments. ``s`` (string) [const char \*] Convert a null terminated UTF-8 string to a JSON string. +``s?`` (string) [const char \*] + Like ``s``, but if the argument is *NULL*, output a JSON null + value. + + .. versionadded:: 2.8 + ``s#`` (string) [const char \*, int] Convert a UTF-8 buffer of a given length to a JSON string. @@ -1239,6 +1245,12 @@ arguments. keep the reference for the JSON value consumed by ``O`` to yourself. +``o?``, ``O?`` (any value) [json_t \*] + Like ``o`` and ``O?``, respectively, but if the argument is + *NULL*, output a JSON null value. + + .. versionadded:: 2.8 + ``[fmt]`` (array) Build an array with contents from the inner format string. ``fmt`` may contain objects and arrays, i.e. recursive value building is |