From ac97e0bf796a2bfd2c3cfc28e93d5b94e4a46018 Mon Sep 17 00:00:00 2001 From: Petri Lehtinen Date: Thu, 25 Feb 2016 07:23:53 +0200 Subject: [PATCH] json_pack(): Document s?, o?, O? --- doc/apiref.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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