json_pack(): Document s?, o?, O?
This commit is contained in:
parent
1927eeb4b4
commit
ac97e0bf79
@ -1185,6 +1185,12 @@ arguments.
|
|||||||
``s`` (string) [const char \*]
|
``s`` (string) [const char \*]
|
||||||
Convert a null terminated UTF-8 string to a JSON string.
|
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]
|
``s#`` (string) [const char \*, int]
|
||||||
Convert a UTF-8 buffer of a given length to a JSON string.
|
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
|
keep the reference for the JSON value consumed by ``O`` to
|
||||||
yourself.
|
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)
|
``[fmt]`` (array)
|
||||||
Build an array with contents from the inner format string. ``fmt``
|
Build an array with contents from the inner format string. ``fmt``
|
||||||
may contain objects and arrays, i.e. recursive value building is
|
may contain objects and arrays, i.e. recursive value building is
|
||||||
|
Loading…
Reference in New Issue
Block a user