aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Dougherty <sdougherty@barracuda.com>2016-04-27 15:25:10 -0400
committerSteve Dougherty <steve@asksteved.com>2016-06-01 11:27:22 -0400
commit7438cc8ba8939448c7fcc7bf50f24c35d086dd32 (patch)
tree38bb63927f3c476bad117758224f6cbc1bf66075
parent762b299e71ecdc46928d6104d9b6cef78c336833 (diff)
downloadjansson-7438cc8ba8939448c7fcc7bf50f24c35d086dd32.zip
jansson-7438cc8ba8939448c7fcc7bf50f24c35d086dd32.tar.gz
jansson-7438cc8ba8939448c7fcc7bf50f24c35d086dd32.tar.bz2
doc: correct argument names
The function signatures use "json", not "root".
-rw-r--r--doc/apiref.rst14
1 files changed, 7 insertions, 7 deletions
diff --git a/doc/apiref.rst b/doc/apiref.rst
index e9551aa..fecb179 100644
--- a/doc/apiref.rst
+++ b/doc/apiref.rst
@@ -910,7 +910,7 @@ can be ORed together to obtain *flags*.
``JSON_ENCODE_ANY``
Specifying this flag makes it possible to encode any JSON value on
its own. Without it, only objects and arrays can be passed as the
- *root* value to the encoding functions.
+ *json* value to the encoding functions.
**Note:** Encoding any value may be useful in some scenarios, but
it's generally discouraged as it violates strict compatibility with
@@ -937,15 +937,15 @@ can be ORed together to obtain *flags*.
The following functions perform the actual JSON encoding. The result
is in UTF-8.
-.. function:: char *json_dumps(const json_t *root, size_t flags)
+.. function:: char *json_dumps(const json_t *json, size_t flags)
- Returns the JSON representation of *root* as a string, or *NULL* on
+ Returns the JSON representation of *json* as a string, or *NULL* on
error. *flags* is described above. The return value must be freed
by the caller using :func:`free()`.
-.. function:: int json_dumpf(const json_t *root, FILE *output, size_t flags)
+.. function:: int json_dumpf(const json_t *json, FILE *output, size_t flags)
- Write the JSON representation of *root* to the stream *output*.
+ Write the JSON representation of *json* to the stream *output*.
*flags* is described above. Returns 0 on success and -1 on error.
If an error occurs, something may have already been written to
*output*. In this case, the output is undefined and most likely not
@@ -953,7 +953,7 @@ is in UTF-8.
.. function:: int json_dump_file(const json_t *json, const char *path, size_t flags)
- Write the JSON representation of *root* to the file *path*. If
+ Write the JSON representation of *json* to the file *path*. If
*path* already exists, it is overwritten. *flags* is described
above. Returns 0 on success and -1 on error.
@@ -976,7 +976,7 @@ is in UTF-8.
.. function:: int json_dump_callback(const json_t *json, json_dump_callback_t callback, void *data, size_t flags)
Call *callback* repeatedly, passing a chunk of the JSON
- representation of *root* each time. *flags* is described above.
+ representation of *json* each time. *flags* is described above.
Returns 0 on success and -1 on error.
.. versionadded:: 2.2