Internal methods for working with json_type_array objects. Although this is exposed by the json_object_get_array() method, it is not recommended for direct use.
+More...
Internal methods for working with json_type_array objects. Although this is exposed by the json_object_get_array() method, it is not recommended for direct use.
If possible, the size should be chosen to closely match the actual number of elements expected to be used. If the exact size is unknown, there are tradeoffs to be made:
+
too small - the array_list code will need to call realloc() more often (which might incur an additional memory copy).
+
too large - will waste memory, but that can be mitigated by calling array_list_shrink() once the final size is known.
Internal methods for working with json_type_array objects. Although this is exposed by the json_object_get_array() method, it is not recommended for direct use
Internal methods for working with json_type_object objects. Although this is exposed by the json_object_get_object() function and within the json_object_iter type, it is not recommended for direct use
Internal string buffer handling. Unless you're writing a json_object_to_json_string_fn implementation for use with json_object_set_serializer() direct use of this is not recommended
+
+
+
+
+
+Generated on Sun Sep 15 2024 16:22:28 for json-c by 1.9.4
+
+
+
diff --git a/doc/html/folderclosed.png b/doc/html/folderclosed.png
new file mode 100644
index 0000000..bb8ab35
Binary files /dev/null and b/doc/html/folderclosed.png differ
diff --git a/doc/html/folderopen.png b/doc/html/folderopen.png
new file mode 100644
index 0000000..d6c7f67
Binary files /dev/null and b/doc/html/folderopen.png differ
diff --git a/doc/html/functions.html b/doc/html/functions.html
new file mode 100644
index 0000000..a329172
--- /dev/null
+++ b/doc/html/functions.html
@@ -0,0 +1,168 @@
+
+
+
+
+
+
+
+json-c: Data Fields
+
+
+
+
+
+
+
+
+
+
+
+
+
json-c 0.18
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Here is a list of all struct and union fields with links to the structures/unions they belong to:
JSON-C implements a reference counting object model that allows you to easily construct JSON objects in C, output them as JSON formatted strings and parse JSON formatted strings back into the C representation of JSON objects. It aims to conform to RFC 8259.
+
Skip down to Using json-c or check out the API docs, if you already have json-c installed and ready to use.
If you believe you've discovered a bug, report it at (https://github.com/json-c/json-c/issues). Please be sure to include the version of json-c you're using, the OS you're running on, and any other relevant details. Fully reproducible test cases and/or patches to fix problems are greatly appreciated.
+
Fixes for bugs, or small new features can be directly submitted as a pull request. For major new features or large changes of any kind, please first start a discussion on the forums.
+
+
+Building on Unix with <tt>git</tt>, <tt>gcc</tt> and <tt>cmake</tt>
+
If you already have json-c installed, see Linking to `libjson-c` for how to build and link your program against it.
$ git clone https://github.com/json-c/json-c.git
+$ mkdir json-c-build
+$ cd json-c-build
+$ cmake ../json-c # See CMake section below for custom arguments
+
Note: it's also possible to put your build directory inside the json-c source directory, or even not use a separate build directory at all, but certain things might not work quite right (notably, make distcheck)
+
Then:
+
$ make
+$ make test
+$ make USE_VALGRIND=0 test # optionally skip using valgrind
+$ sudo make install # it could be necessary to execute make install
+
+Generating documentation with Doxygen:
+
The library documentation can be generated directly from the source code using Doxygen tool:
+
# in build directory
+make doc
+google-chrome doc/html/index.html
+
+
+CMake Options
+
The json-c library is built with CMake, which can take a few options.
+
+
+
Variable
Type
Description
+
+
CMAKE_INSTALL_PREFIX
String
The install location.
+
+
CMAKE_BUILD_TYPE
String
Defaults to "debug".
+
+
BUILD_SHARED_LIBS
Bool
The default build generates a dynamic (dll/so) library. Set this to OFF to create a static library only.
+
+
BUILD_STATIC_LIBS
Bool
The default build generates a static (lib/a) library. Set this to OFF to create a shared library only.
+
+
DISABLE_STATIC_FPIC
Bool
The default builds position independent code. Set this to OFF to create a shared library only.
+
+
DISABLE_BSYMBOLIC
Bool
Disable use of -Bsymbolic-functions.
+
+
DISABLE_THREAD_LOCAL_STORAGE
Bool
Disable use of Thread-Local Storage (HAVE___THREAD).
+
+
DISABLE_WERROR
Bool
Disable use of -Werror.
+
+
DISABLE_EXTRA_LIBS
Bool
Disable use of extra libraries, libbsd
+
+
DISABLE_JSON_POINTER
Bool
Omit json_pointer support from the build.
+
+
ENABLE_RDRAND
Bool
Enable RDRAND Hardware RNG Hash Seed.
+
+
ENABLE_THREADING
Bool
Enable partial threading support.
+
+
OVERRIDE_GET_RANDOM_SEED
String
A block of code to use instead of the default implementation of json_c_get_random_seed(), e.g. on embedded platforms where not even the fallback to time() works. Must be a single line.
+
+
Pass these options as -D on CMake's command-line.
+
# build a static library only
+cmake -DBUILD_SHARED_LIBS=OFF ..
+
+Building with partial threading support
+
Although json-c does not support fully multi-threaded access to object trees, it has some code to help make its use in threaded programs a bit safer. Currently, this is limited to using atomic operations for json_object_get() and json_object_put().
+
Since this may have a performance impact, of at least 3x slower according to https://stackoverflow.com/a/11609063, it is disabled by default. You may turn it on by adjusting your cmake command with: -DENABLE_THREADING=ON
+
Separately, the default hash function used for object field keys, lh_char_hash, uses a compare-and-swap operation to ensure the random seed is only generated once. Because this is a one-time operation, it is always compiled in when the compare-and-swap operation is available.
+
+cmake-configure wrapper script
+
For those familiar with the old autoconf/autogen.sh/configure method, there is a cmake-configure wrapper script to ease the transition to cmake.
By default, if valgrind is available running tests uses it. That can slow the tests down considerably, so to disable it use:
export USE_VALGRIND=0
+
To run tests a separate build directory is recommended:
mkdir build-test
+cd build-test
+# VALGRIND=1 causes -DVALGRIND=1 to be passed when compiling code
+# which uses slightly slower, but valgrind-safe code.
+VALGRIND=1 cmake ..
+make
+
+make test
+# By default, if valgrind is available running tests uses it.
+make USE_VALGRIND=0 test # optionally skip using valgrind
+
If a test fails, check Testing/Temporary/LastTest.log, tests/testSubDir/${testname}/${testname}.vg.out, and other similar files. If there is insufficient output try:
VERBOSE=1 CTEST_OUTPUT_ON_FAILURE=1 make test
+
or
JSONC_TEST_TRACE=1 make test
+
and check the log files again.
+
+
+Building on Unix and Windows with <tt>vcpkg</tt>
+
You can download and install JSON-C using the vcpkg dependency manager:
The JSON-C port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please create an issue or pull request on the vcpkg repository.
The primary type in json-c is json_object. It describes a reference counted tree of json objects which are created by either parsing text with a json_tokener (i.e. json_tokener_parse_ex()), or by creating (with json_object_new_object(), json_object_new_int(), etc...) and adding (with json_object_object_add(), json_object_array_add(), etc...) them individually. Typically, every object in the tree will have one reference, from its parent. When you are done with the tree of objects, you call json_object_put() on just the root object to free it, which recurses down through any child objects calling json_object_put() on each one of those in turn.
A json_object tree can be serialized back into a string with json_object_to_json_string_ext(). The string that is returned is only valid until the next "to_json_string" call on that same object. Also, it is freed when the json_object is freed.
+
+
+
+
+Generated on Sun Sep 15 2024 16:22:28 for json-c by 1.9.4
+
+
+
diff --git a/doc/html/issues__closed__for__0_813_8md.html b/doc/html/issues__closed__for__0_813_8md.html
new file mode 100644
index 0000000..67613ed
--- /dev/null
+++ b/doc/html/issues__closed__for__0_813_8md.html
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+json-c: issues_closed_for_0.13.md File Reference
+
+
+
+
+
+
+
+
+
+
+
+
+
json-c 0.18
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
issues_closed_for_0.13.md File Reference
+
+
+
+
+
+Generated on Sun Sep 15 2024 16:22:28 for json-c by 1.9.4
+
+
+
diff --git a/doc/html/issues__closed__for__0_814_8md.html b/doc/html/issues__closed__for__0_814_8md.html
new file mode 100644
index 0000000..2980e33
--- /dev/null
+++ b/doc/html/issues__closed__for__0_814_8md.html
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+json-c: issues_closed_for_0.14.md File Reference
+
+
+
+
+
+
+
+
+
+
+
+
+
json-c 0.18
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
issues_closed_for_0.14.md File Reference
+
+
+
+
+
+Generated on Sun Sep 15 2024 16:22:28 for json-c by 1.9.4
+
+
+
diff --git a/doc/html/issues__closed__for__0_815_8md.html b/doc/html/issues__closed__for__0_815_8md.html
new file mode 100644
index 0000000..1ff804c
--- /dev/null
+++ b/doc/html/issues__closed__for__0_815_8md.html
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+json-c: issues_closed_for_0.15.md File Reference
+
+
+
+
+
+
+
+
+
+
+
+
+
json-c 0.18
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
issues_closed_for_0.15.md File Reference
+
+
+
+
+
+Generated on Sun Sep 15 2024 16:22:28 for json-c by 1.9.4
+
+
+
diff --git a/doc/html/issues__closed__for__0_816_8md.html b/doc/html/issues__closed__for__0_816_8md.html
new file mode 100644
index 0000000..9103f13
--- /dev/null
+++ b/doc/html/issues__closed__for__0_816_8md.html
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+json-c: issues_closed_for_0.16.md File Reference
+
+
+
+
+
+
+
+
+
+
+
+
+
json-c 0.18
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
issues_closed_for_0.16.md File Reference
+
+
+
+
+
+Generated on Sun Sep 15 2024 16:22:28 for json-c by 1.9.4
+
+
+
diff --git a/doc/html/issues__closed__for__0_817_8md.html b/doc/html/issues__closed__for__0_817_8md.html
new file mode 100644
index 0000000..40186fb
--- /dev/null
+++ b/doc/html/issues__closed__for__0_817_8md.html
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+json-c: issues_closed_for_0.17.md File Reference
+
+
+
+
+
+
+
+
+
+
+
+
+
json-c 0.18
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
issues_closed_for_0.17.md File Reference
+
+
+
+
+
+Generated on Sun Sep 15 2024 16:22:28 for json-c by 1.9.4
+
+
+
diff --git a/doc/html/issues__closed__for__0_818_8md.html b/doc/html/issues__closed__for__0_818_8md.html
new file mode 100644
index 0000000..2276deb
--- /dev/null
+++ b/doc/html/issues__closed__for__0_818_8md.html
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+json-c: issues_closed_for_0.18.md File Reference
+
+
+
+
+
+
+
The json-c version encoded into an int, with the low order 8 bits being the micro version, the next higher 8 bits being the minor version and the next higher 8 bits being the major version. For example, 7.12.99 would be 0x00070B63.
A flag for the json_object_object_add_ex function which flags the key as being constant memory. This means that the key will NOT be copied via strdup(), resulting in a potentially huge performance win (malloc, strdup and free are usually performance hogs). It is acceptable to use this flag for keys in non-constant memory blocks if the caller ensure that the memory holding the key lives longer than the corresponding json object. However, this is somewhat dangerous and should only be done if really justified. The general use-case for this flag is cases where the key is given as a real constant value in the function call, e.g. as in json_object_object_add_ex(obj, "ip", json, JSON_C_OBJECT_ADD_CONSTANT_KEY);
A flag for the json_object_object_add_ex function which causes the value to be added without a check if it already exists. Note: it is the responsibility of the caller to ensure that no key is added multiple times. If this is done, results are unpredictable. While this option is somewhat dangerous, it permits potentially large performance savings in code that knows for sure the key values are unique (e.g. because the code adds a well-known set of constant key values).
This flag is an alias to JSON_C_OBJECT_ADD_CONSTANT_KEY. Historically, this flag was used first and the new name JSON_C_OBJECT_ADD_CONSTANT_KEY was introduced for version 0.16.00 in order to have regular naming. Use of this flag is now legacy.
Set a thread-local value of an option, overriding the global value. This will fail if json-c is not compiled with threading enabled, and with the __thread specifier (or equivalent) available.
If src is part of a containing object or array, parent will be non-NULL, and key or index will be provided. When shallow_copy is called *dst will be NULL, and must be non-NULL when it returns. src will never be NULL.
+
If shallow_copy sets the serializer on an object, return 2 to indicate to json_object_deep_copy that it should not attempt to use the standard userdata copy function.
JSON_EXPORT int json_c_set_serialization_double_format
+
(
+
const char *
+
double_format,
+
+
+
+
+
int
+
global_or_thread
+
+
+
+
)
+
+
+
+
+
Set a global or thread-local json-c option, depending on whether JSON_C_OPTION_GLOBAL or JSON_C_OPTION_THREAD is passed. Thread-local options default to undefined, and inherit from the global value, even if the global value is changed after the thread is created. Attempting to set thread-local options when threading is not compiled in will result in an error. Be sure to check the return value.
+
double_format is a "%g" printf format, such as "%.20g"
Add an element to the end of a json_object of type json_type_array
+
The reference count will not be incremented. This is to make adding fields to objects in code more compact. If you want to retain a reference to an added object you must wrap the passed object with json_object_get
Binary search a sorted array for a specified key object.
+
It depends on your compare function what's sufficient as a key. Usually you create some dummy object with the parameter compared in it, to identify the right item you're actually looking for.
Delete an elements from a specified index in an array (a json_object of type json_type_array)
+
The reference count will be decremented for each of the deleted objects. If there are no more owners of an element that is being deleted, then the value is freed. Otherwise, the reference to the value will remain in memory.
Get the element at specified index of array obj (which must be a json_object of type json_type_array)
+
No reference counts will be changed, and ownership of the returned object remains with obj. See json_object_object_get() for additional implications of this behavior.
+
Calling this with anything other than a json_type_array will trigger an assert.
Insert an element at a specified index in an array (a json_object of type json_type_array)
+
The reference count will not be incremented. This is to make adding fields to objects in code more compact. If you want to retain a reference to an added object you must wrap the passed object with json_object_get
+
The array size will be automatically be expanded to the size of the index if the index is larger than the current size. If the index is within the existing array limits, then the element will be inserted and all elements will be shifted. This is the only difference between this function and json_object_array_put_idx().
Insert or replace an element at a specified index in an array (a json_object of type json_type_array)
+
The reference count will not be incremented. This is to make adding fields to objects in code more compact. If you want to retain a reference to an added object you must wrap the passed object with json_object_get
+
The reference count of a replaced object will be decremented.
+
The array size will be automatically be expanded to the size of the index if the index is larger than the current size.
Copy the contents of the JSON object. The destination object must be initialized to NULL, to make sure this function won't overwrite an existing JSON object.
+
This does roughly the same thing as json_tokener_parse(json_object_get_string(src)).
+
Parameters
+
+
src
source JSON object whose contents will be copied
+
dst
pointer to the destination object where the contents of src; make sure this pointer is initialized to NULL
+
shallow_copy
an optional function to copy individual objects, needed when custom serializers are in use. See also json_object set_serializer.
+
+
+
+
Returns
0 if the copy went well, -1 if an error occurred during copy or if the destination pointer is non-NULL
Serialize a json_object of type json_type_double to a string.
+
This function isn't meant to be called directly. Instead, you can set a custom format string for the serialization of this double using the following call (where "%.17g" actually is the default):
Sharing a json_object with multiple (not necessarily parallel) threads of execution that all expect to free it (with json_object_put()) when they're done.
The type is coerced to a json_bool if the passed object is not a json_bool. integer and double objects will return 0 if there value is zero or 1 otherwise. If the passed object is a string it will return 1 if it has a non zero length. If any other object type is passed 0 will be returned, even non-empty json_type_array and json_type_object objects.
Get the double floating point value of a json_object
+
The type is coerced to a double if the passed object is not a double. integer objects will return their double conversion. Strings will be parsed as a double. If no conversion exists then 0.0 is returned and errno is set to EINVAL. null is equivalent to 0 (no error values set)
+
If the value is too big to fit in a double, then the value is set to the closest infinity with errno set to ERANGE. If strings cannot be converted to their double value, then EINVAL is set & NaN is returned.
+
Arrays of length 0 are interpreted as 0 (with no error flags set). Arrays of length 1 are effectively cast to the equivalent object and converted using the above rules. All other arrays set the error to EINVAL & return NaN.
+
NOTE: Set errno to 0 directly before a call to this function to determine whether or not conversion was successful (it does not clear the value for you).
The type is coerced to a int if the passed object is not a int. double objects will return their integer conversion. Strings will be parsed as an integer. If no conversion exists then 0 is returned and errno is set to EINVAL. null is equivalent to 0 (no error values set)
+
Note that integers are stored internally as 64-bit values. If the value of too big or too small to fit into 32-bit, INT32_MAX or INT32_MIN are returned, respectively.
The type is coerced to a int64 if the passed object is not a int64. double objects will return their int64 conversion. Strings will be parsed as an int64. If no conversion exists then 0 is returned.
+
NOTE: Set errno to 0 directly before a call to this function to determine whether or not conversion was successful (it does not clear the value for you).
Get the type of the json_object. See also json_type_to_name() to turn this into a string suitable, for instance, for logging.
+
Parameters
+
+
obj
the json_object instance
+
+
+
+
Returns
type being one of: json_type_null (i.e. obj == NULL), json_type_boolean, json_type_double, json_type_int, json_type_object, json_type_array, json_type_string
The type is coerced to a uint64 if the passed object is not a uint64. double objects will return their uint64 conversion. Strings will be parsed as an uint64. If no conversion exists then 0 is returned.
+
NOTE: Set errno to 0 directly before a call to this function to determine whether or not conversion was successful (it does not clear the value for you).
Increment a json_type_int object by the given amount, which may be negative.
+
If the type of obj is not json_type_int then 0 is returned with no further action taken. If the addition would result in a overflow, the object value is set to INT64_MAX. If the addition would result in a underflow, the object value is set to INT64_MIN. Neither overflow nor underflow affect the return value.
Create a new empty json_object of type json_type_array with 32 slots allocated. If you know the array size you'll need ahead of time, use json_object_new_array_ext() instead.
Create a new json_object of type json_type_double, using the exact serialized representation of the value.
+
This allows for numbers that would otherwise get displayed inefficiently (e.g. 12.3 => "12.300000000000001") to be serialized with the more convenient form.
+
Notes:
+
This is used by json_tokener_parse_ex() to allow for an exact re-serialization of a parsed object.
+
The userdata field is used to store the string representation, so it can't be used for other data if this function is used.
+
A roughly equivalent sequence of calls, with the difference being that the serialization function won't be reset by json_object_set_double(), is:
Create a new empty json_object of type json_type_int Note that values are stored as 64-bit values internally. To ensure the full range is maintained, use json_object_new_int64 instead.
This method exists only to provide a complementary function along the lines of the other json_object_new_* functions. It always returns NULL, and it is entirely acceptable to simply use NULL directly.
Create a new empty object with a reference count of 1. The caller of this object initially has sole ownership. Remember, when using json_object_object_add or json_object_array_put_idx, ownership will transfer to the object/array. Call json_object_get if you want to maintain shared ownership or also add this object as a child of multiple objects or arrays. Any ownerships you acquired but did not transfer must be released through json_object_put.
Add an object field to a json_object of type json_type_object
+
The reference count of val will not be incremented, in effect transferring ownership that object to obj, and thus val will be freed when obj is. (i.e. through json_object_put(obj))
+
If you want to retain a reference to the added object, independent of the lifetime of obj, you must increment the refcount with json_object_get(val) (and later release it with json_object_put()).
+
Since ownership transfers to obj, you must make sure that you do in fact have ownership over val. For instance, json_object_new_object() will give you ownership until you transfer it, whereas json_object_object_get() does not.
+
Any previous object stored under key in obj will have its refcount decremented, and be freed normally if that drops to zero.
+
Parameters
+
+
obj
the json_object instance
+
key
the object field name (a private copy will be duplicated)
+
val
a json_object or NULL member to associate with the given field
+
+
+
+
Returns
On success, 0 is returned. On error, a negative value is returned.
Add an object field to a json_object of type json_type_object
+
The semantics are identical to json_object_object_add, except that an additional flag fields gives you more control over some detail aspects of processing. See the description of JSON_C_OBJECT_ADD_* flags for more details.
+
Parameters
+
+
obj
the json_object instance
+
key
the object field name (a private copy will be duplicated)
+
val
a json_object or NULL member to associate with the given field
+
opts
process-modifying options. To specify multiple options, use (OPT1|OPT2)
The reference count will be decremented for the deleted object. If there are no more owners of the value represented by this key, then the value is freed. Otherwise, the reference to the value will remain in memory.
Get the json_object associate with a given object field. Deprecated/discouraged: used json_object_object_get_ex instead.
+
This returns NULL if the field is found but its value is null, or if the field is not found, or if obj is not a json_type_object. If you need to distinguish between these cases, use json_object_object_get_ex().
+
No reference counts will be changed. There is no need to manually adjust reference counts through the json_object_put/json_object_get methods unless you need to have the child (value) reference maintain a different lifetime than the owning parent (obj). Ownership of the returned value is retained by obj (do not do json_object_put unless you have done a json_object_get). If you delete the value from obj (json_object_object_del) and wish to access the returned reference afterwards, make sure you have first gotten shared ownership through json_object_get (& don't forget to do a json_object_put or transfer ownership to prevent a memory leak).
+
Parameters
+
+
obj
the json_object instance
+
key
the object field name
+
+
+
+
Returns
the json_object associated with the given field name
Get the json_object associated with a given object field.
+
This returns true if the key is found, false in all other cases (including if obj isn't a json_type_object).
+
No reference counts will be changed. There is no need to manually adjust reference counts through the json_object_put/json_object_get methods unless you need to have the child (value) reference maintain a different lifetime than the owning parent (obj). Ownership of value is retained by obj.
+
Parameters
+
+
obj
the json_object instance
+
key
the object field name
+
value
a pointer where to store a reference to the json_object associated with the given field name.
Decrement the reference count of json_object and free if it reaches zero.
+
You must have ownership of obj prior to doing this or you will cause an imbalance in the reference count, leading to a classic use-after-free bug. In particular, you normally do not need to call json_object_put() on the json_object returned by json_object_object_get() or json_object_array_get_idx().
+
Just like after calling free() on a block of memory, you must not use obj after calling json_object_put() on it or any object that it is a member of (unless you know you've called json_object_get(obj) to explicitly increment the refcount).
+
NULL may be passed, in which case this is a no-op.
+
Parameters
+
+
obj
the json_object instance
+
+
+
+
Returns
1 if the object was freed, 0 if only the refcount was decremented
The type of obj is checked to be a json_type_boolean and 0 is returned if it is not without any further actions. If type of obj is json_type_boolean the object value is changed to new_value
The type of obj is checked to be a json_type_double and 0 is returned if it is not without any further actions. If type of obj is json_type_double the object value is changed to new_value
+
If the object was created with json_object_new_double_s(), the serialization function is reset to the default and the cached serialized value is cleared.
The type of obj is checked to be a json_type_int and 0 is returned if it is not without any further actions. If type of obj is json_type_int the object value is changed to new_value
The type of obj is checked to be a json_type_int and 0 is returned if it is not without any further actions. If type of obj is json_type_int the object value is changed to new_value
Set a custom serialization function to be used when this particular object is converted to a string by json_object_to_json_string.
+
If custom userdata is already set on this object, any existing user_delete function is called before the new one is set.
+
If to_string_func is NULL the default behaviour is reset (but the userdata and user_delete fields are still set).
+
The userdata parameter is optional and may be passed as NULL. It can be used to provide additional data for to_string_func to use. This parameter may be NULL even if user_delete is non-NULL.
+
The user_delete parameter is optional and may be passed as NULL, even if the userdata parameter is non-NULL. It will be called just before the json_object is deleted, after it's reference count goes to zero (see json_object_put()). If this is not provided, it is up to the caller to free the userdata at an appropriate time. (i.e. after the json_object is deleted)
The type of obj is checked to be a json_type_string and 0 is returned if it is not without any further actions. If type of obj is json_type_string the object value is changed to new_value
+
Parameters
+
+
obj
the json_object instance
+
new_value
the value to be set; Since string length is given in len this need not be zero terminated
The type of obj is checked to be a json_type_uint and 0 is returned if it is not without any further actions. If type of obj is json_type_uint the object value is changed to new_value
If custom userdata is already set on this object, any existing user_delete function is called before the new one is set.
+
The user_delete parameter is optional and may be passed as NULL, even if the userdata parameter is non-NULL. It will be called just before the json_object is deleted, after it's reference count goes to zero (see json_object_put()). If this is not provided, it is up to the caller to free the userdata at an appropriate time. (i.e. after the json_object is deleted)
+
Note: Objects created by parsing strings may have custom serializers set which expect the userdata to contain specific data (due to use of json_object_new_double_s()). In this case, json_object_set_serialiser() with NULL as to_string_func should be used instead to set the userdata and reset the serializer to its default value.
Stringify object to json format. Equivalent to json_object_to_json_string_ext(obj, JSON_C_TO_STRING_SPACED) The pointer you get is an internal of your json object. You don't have to free it, later use of json_object_put() should be sufficient. If you can not ensure there's no concurrent access to *obj use strdup().
The default shallow copy implementation for use with json_object_deep_copy(). This simply calls the appropriate json_object_new_<type>() function and copies over the serializer function (_to_json_string internal field of the json_object structure) but not any _userdata or _user_delete values.
+
If you're writing a custom shallow_copy function, perhaps because you're using your own custom serializer, you can call this first to create the new object before customizing it with json_object_set_serializer().
Retrieves an iterator to the first pair of the JSON Object.
+
Warning
Any modification of the underlying pair invalidates all iterators to that pair.
+
Parameters
+
+
obj
JSON Object instance (MUST be of type json_object)
+
+
+
+
Returns
json_object_iterator If the JSON Object has at least one pair, on return, the iterator refers to the first pair. If the JSON Object doesn't have any pairs, the returned iterator is equivalent to the "end" iterator for the same JSON Object instance.
Retrieves the iterator that represents the position beyond the last pair of the given JSON Object instance.
+
Warning
Do NOT write code that assumes that the "end" iterator value is NULL, even if it is so in a particular instance of the implementation.
+
Note
The reason we do not (and MUST NOT) provide "json_object_iter_is_end(json_object_iterator* iter)" type of API is because it would limit the underlying representation of name/value containment (or force us to add additional, otherwise unnecessary, fields to the iterator structure). The "end" iterator and the equality test method, on the other hand, permit us to cleanly abstract pretty much any reasonable underlying representation without burdening the iterator structure with unnecessary data.
+
+For performance reasons, memorize the "end" iterator prior to any loop.
+
Parameters
+
+
obj
JSON Object instance (MUST be of type json_object)
+
+
+
+
Returns
json_object_iterator On return, the iterator refers to the "end" of the Object instance's pairs (i.e., NOT the last pair, but "beyond the last
+ pair" value)
Tests two iterators for equality. Typically used to test for end of iteration by comparing an iterator to the corresponding "end" iterator (that was derived from the same JSON Object instance).
+
Note
The reason we do not (and MUST NOT) provide "json_object_iter_is_end(json_object_iterator* iter)" type of API is because it would limit the underlying representation of name/value containment (or force us to add additional, otherwise unnecessary, fields to the iterator structure). The equality test method, on the other hand, permits us to cleanly abstract pretty much any reasonable underlying representation.
+
Parameters
+
+
iter1
Pointer to first valid, non-NULL iterator
+
iter2
POinter to second valid, non-NULL iterator
+
+
+
+
Warning
if a NULL iterator pointer or an uninitialized or invalid iterator, or iterators derived from different JSON Object instances are passed, bad things will happen!
+
Returns
json_bool non-zero if iterators are equal (i.e., both reference the same name/value pair or are both at "end"); zero if they are not equal.
Initializes an iterator structure to a "default" value that is convenient for initializing an iterator variable to a default state (e.g., initialization list in a class' constructor).
The initialized value doesn't reference any specific pair, is considered an invalid iterator, and MUST NOT be passed to any json-c API that expects a valid iterator.
+
+User and internal code MUST NOT make any assumptions about and dependencies on the value of the "default" iterator value.
Any modification of the underlying pair invalidates all iterators to that pair.
+
Parameters
+
+
iter
[IN/OUT] Pointer to iterator that references a name/value pair; MUST be a valid, non-end iterator. WARNING: bad things will happen if invalid or "end" iterator is passed. Upon return will contain the reference to the next pair if there is one; if there are no more pairs, will contain the "end" iterator value, which may be compared against the return value of json_object_iter_end() for the same JSON Object instance.
Returns a const pointer to the name of the pair referenced by the given iterator.
+
Parameters
+
+
iter
pointer to iterator that references a name/value pair; MUST be a valid, non-end iterator.
+
+
+
+
Warning
bad things will happen if an invalid or "end" iterator is passed.
+
Returns
const char* Pointer to the name of the referenced name/value pair. The name memory belongs to the name/value pair, will be freed when the pair is deleted or modified, and MUST NOT be modified or freed by the user.
Returns a pointer to the json-c instance representing the value of the referenced name/value pair, without altering the instance's reference count.
+
Parameters
+
+
iter
pointer to iterator that references a name/value pair; MUST be a valid, non-end iterator.
+
+
+
+
Warning
bad things will happen if invalid or "end" iterator is passed.
+
Returns
struct json_object* Pointer to the json-c value instance of the referenced name/value pair; the value's reference count is not changed by this function: if you plan to hold on to this json-c node, take a look at json_object_get() and json_object_put(). IMPORTANT: json-c API represents the JSON Null value as a NULL json_object instance pointer.
+
+
+
+
+
+
+Generated on Sun Sep 15 2024 16:22:28 for json-c by 1.9.4
+
+
+
diff --git a/doc/html/json__patch_8h.html b/doc/html/json__patch_8h.html
new file mode 100644
index 0000000..ae8714f
--- /dev/null
+++ b/doc/html/json__patch_8h.html
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
+json-c: json_patch.h File Reference
+
+
+
+
+
+
+
Apply the JSON patch to the base object. The patch object must be formatted as per RFC 6902, i.e. a json_type_array containing patch operations. If the patch is not correctly formatted, an error will be returned.
+
The json_object at *base will be modified in place. Exactly one of *base or copy_from must be non-NULL. If *base is NULL, a new copy of copy_from will allocated and populated using json_object_deep_copy(). In this case json_object_put()must be used to free *base even if the overall patching operation fails.
+
If anything fails during patching a negative value will be returned, and patch_error (if non-NULL) will be populated with error details.
+
Parameters
+
+
base
a pointer to the JSON object which to patch
+
patch
the JSON object that describes the patch to be applied
+
copy_from
a JSON object to copy to *base
+
patch_error
optional, details about errors
+
+
+
+
Returns
negative if an error (or not found), or 0 if patch completely applied
+
+
+
+
+
+
+Generated on Sun Sep 15 2024 16:22:28 for json-c by 1.9.4
+
+
+
diff --git a/doc/html/json__pointer_8h.html b/doc/html/json__pointer_8h.html
new file mode 100644
index 0000000..d926e79
--- /dev/null
+++ b/doc/html/json__pointer_8h.html
@@ -0,0 +1,270 @@
+
+
+
+
+
+
+
+json-c: json_pointer.h File Reference
+
+
+
+
+
+
+
Retrieves a JSON sub-object from inside another JSON object using the JSON pointer notation as defined in RFC 6901 https://tools.ietf.org/html/rfc6901
+
The returned JSON sub-object is equivalent to parsing manually the 'obj' JSON tree ; i.e. it's not a new object that is created, but rather a pointer inside the JSON tree.
Sets JSON object 'value' in the 'obj' tree at the location specified by the 'path'. 'path' is JSON pointer notation as defined in RFC 6901 https://tools.ietf.org/html/rfc6901
+
Note that 'obj' is a double pointer, mostly for the "" (empty string) case, where the entire JSON object would be replaced by 'value'. In the case of the "" path, the object at '*obj' will have it's refcount decremented with 'json_object_put()' and the 'value' object will be assigned to it.
+
For other cases (JSON sub-objects) ownership of 'value' will be transferred into '*obj' via 'json_object_object_add()' & 'json_object_array_put_idx()', so the only time the refcount should be decremented for 'value' is when the return value of 'json_pointer_set()' is negative (meaning the 'value' object did not get set into '*obj').
+
That also implies that 'json_pointer_set()' does not do any refcount incrementing. (Just that single decrement that was mentioned above).
+
Parameters
+
+
obj
the json_object instance/tree to which to add a sub-object
+
path
a (RFC6901) string notation for the sub-object to set in the tree
+
value
object to set at path
+
+
+
+
Returns
negative if an error (or not found), or 0 if succeeded
Be strict when parsing JSON input. Use caution with this flag as what is considered valid may become more restrictive from one release to the next, causing your code to fail on previously working input.
+
Note that setting this will also effectively disable parsing of multiple json objects in a single character stream (e.g. {"foo":123}{"bar":234}); if you want to allow that also set JSON_TOKENER_ALLOW_TRAILING_CHARS
Cause json_tokener_parse_ex() to validate that input is UTF8. If this flag is specified and validation fails, then json_tokener_get_error(tok) will return json_tokener_error_parse_utf8_string
Return the offset of the byte after the last byte parsed relative to the start of the most recent string passed in to json_tokener_parse_ex(). i.e. this is where parsing would start again if the input contains another JSON object after the currently parsed one.
+
Note that when multiple parse calls are issued, this is not the total number of characters parsed.
+
In the past this would have been accessed as tok->char_offset.
Parse a string and return a non-NULL json_object if a valid JSON value is found. The string does not need to be a JSON object or array; it can also be a string, number or boolean value.
+
A partial JSON string can be parsed. If the parsing is incomplete, NULL will be returned and json_tokener_get_error() will return json_tokener_continue. json_tokener_parse_ex() can then be called with additional bytes in str to continue the parsing.
+
If json_tokener_parse_ex() returns NULL and the error is anything other than json_tokener_continue, a fatal error has occurred and parsing must be halted. Then, the tok object must not be reused until json_tokener_reset() is called.
+
When a valid JSON value is parsed, a non-NULL json_object will be returned, with a reference count of one which belongs to the caller. Also, json_tokener_get_error() will return json_tokener_success. Be sure to check the type with json_object_is_type() or json_object_get_type() before using the object.
+
Trailing characters after the parsed value do not automatically cause an error. It is up to the caller to decide whether to treat this as an error or to handle the additional characters, perhaps by parsing another json value starting from that point.
+
If the caller knows that they are at the end of their input, the length passed MUST include the final '\0' character, so values with no inherent end (i.e. numbers) can be properly parsed, rather than just returning json_tokener_continue.
+
Extra characters can be detected by comparing the value returned by json_tokener_get_parse_end() against the length of the last len parameter passed in.
+
The tokener does not maintain an internal buffer so the caller is responsible for a subsequent call to json_tokener_parse_ex with an appropriate str parameter starting with the extra characters.
+
This interface is presently not 64-bit clean due to the int len argument so the function limits the maximum string size to INT32_MAX (2GB). If the function is called with len == -1 then strlen is called to check the string length is less than INT32_MAX (2GB)
Create a JSON object from already opened file descriptor.
+
This function can be helpful, when you opened the file already, e.g. when you have a temp file. Note, that the fd must be readable at the actual position, i.e. use lseek(fd, 0, SEEK_SET) before.
+
The depth argument specifies the maximum object depth to pass to json_tokener_new_ex(). When depth == -1, JSON_TOKENER_DEFAULT_DEPTH is used instead.
A parsing helper for integer values. Returns 0 on success, with the parsed value assigned to *retval. Overflow/underflow are NOT considered errors, but errno will be set to ERANGE, just like the strtol/strtoll functions do.
Return the last error from various json-c functions, including: json_object_to_file{,ext}, json_object_to_fd() or json_object_from{file,fd}, or NULL if there is none.
+
+
+
+
+
+
+Generated on Sun Sep 15 2024 16:22:28 for json-c by 1.9.4
+
+
+
diff --git a/doc/html/json__visit_8h.html b/doc/html/json__visit_8h.html
new file mode 100644
index 0000000..70e41b5
--- /dev/null
+++ b/doc/html/json__visit_8h.html
@@ -0,0 +1,248 @@
+
+
+
+
+
+
+
+json-c: json_visit.h File Reference
+
+
+
+
+
+
+
This json_c_visit_userfunc return value indicates that iteration of the fields/elements of the containing object should stop and continue "popped up" a level of the object hierarchy. For example, returning this when handling arg will result in arg3 and any other fields being skipped. The next call to userfunc will be the JSON_C_VISIT_SECOND call on "foo", followed by a userfunc call on "bar".
This json_c_visit_userfunc return value indicates that iteration over the members of the current object should be skipped. If the current object isn't a container (array or object), this is no different than JSON_C_VISIT_RETURN_CONTINUE.
Passed to json_c_visit_userfunc as one of the flags values to indicate that this is the second time a container (array or object) is being called, after all of it's members have been iterated over.
Visit each object in the JSON hierarchy starting at jso. For each object, userfunc is called, passing the object and userarg. If the object has a parent (i.e. anything other than jso itself) its parent will be passed as parent_jso, and either jso_key or jso_index will be set, depending on whether the parent is an object or an array.
+
Nodes will be visited depth first, but containers (arrays and objects) will be visited twice, the second time with JSON_C_VISIT_SECOND set in flags.
+
userfunc must return one of the defined return values, to indicate whether and how to continue visiting nodes, or one of various ways to stop.
+
Returns 0 if nodes were visited successfully, even if some were intentionally skipped due to what userfunc returned. Returns <0 if an error occurred during iteration, including if userfunc returned JSON_C_VISIT_RETURN_ERROR.
+
+
+
+
+
+
+Generated on Sun Sep 15 2024 16:22:28 for json-c by 1.9.4
+
+
+
diff --git a/doc/html/linkhash_8h.html b/doc/html/linkhash_8h.html
new file mode 100644
index 0000000..9fee1e7
--- /dev/null
+++ b/doc/html/linkhash_8h.html
@@ -0,0 +1,1152 @@
+
+
+
+
+
+
+
+json-c: linkhash.h File Reference
+
+
+
+
+
+
+
Internal methods for working with json_type_object objects. Although this is exposed by the json_object_get_object() function and within the json_object_iter type, it is not recommended for direct use.
+More...
Internal methods for working with json_type_object objects. Although this is exposed by the json_object_get_object() function and within the json_object_iter type, it is not recommended for direct use.
This is an extension to support functions that need to calculate the hash several times and allows them to do it just once and then pass in the hash to all utility functions. Depending on use case, this can be a considerable performance improvement.
Insert a record into the table using a precalculated key hash.
+
The hash h, which should be calculated with lh_get_hash() on k, is provided by the caller, to allow for optimization when multiple operations with the same key are known to be needed.
+
Parameters
+
+
t
the table to insert into.
+
k
a pointer to the key to insert.
+
v
a pointer to the value to insert.
+
h
hash value of the key to insert
+
opts
if set to JSON_C_OBJECT_ADD_CONSTANT_KEY, sets lh_entry.k_is_constant so t's free function knows to avoid freeing the key.
Lookup a record in the table using a precalculated key hash.
+
The hash h, which should be calculated with lh_get_hash() on k, is provided by the caller, to allow for optimization when multiple operations with the same key are known to be needed.
+
Parameters
+
+
t
the table to lookup
+
k
a pointer to the key to lookup
+
h
hash value of the key to lookup
+
+
+
+
Returns
a pointer to the record structure of the value or NULL if it does not exist.
initial table size. The table is automatically resized although this incurs a performance penalty.
+
free_fn
callback function used to free memory for entries when lh_table_free or lh_table_delete is called. If NULL is provided, then memory for keys and values must be freed by the caller.
+
hash_fn
function used to hash keys. 2 standard ones are defined: lh_ptr_hash and lh_char_hash for hashing pointer values and C strings respectively.
+
equal_fn
comparison function to compare keys. 2 standard ones defined: lh_ptr_hash and lh_char_hash for comparing pointer values and C strings respectively.
+
+
+
+
Returns
On success, a pointer to the new linkhash table is returned. On error, a null pointer is returned.
Issue #869 - At a high level how are jsons parses? Are they terminated by the new line?
+
Issue #870 - Non-Compliant features should be optional (and disabled)
+
+
+
+
+
+Generated on Sun Sep 15 2024 16:22:28 for json-c by 1.9.4
+
+
+
diff --git a/doc/html/menu.js b/doc/html/menu.js
new file mode 100644
index 0000000..818b859
--- /dev/null
+++ b/doc/html/menu.js
@@ -0,0 +1,135 @@
+/*
+ @licstart The following is the entire license notice for the JavaScript code in this file.
+
+ The MIT License (MIT)
+
+ Copyright (C) 1997-2020 by Dimitri van Heesch
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ and associated documentation files (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all copies or
+ substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+ BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ @licend The above is the entire license notice for the JavaScript code in this file
+ */
+function initMenu(relPath,searchEnabled,serverSide,searchPage,search) {
+ function makeTree(data,relPath) {
+ var result='';
+ if ('children' in data) {
+ result+='
';
+ for (var i in data.children) {
+ var url;
+ var link;
+ link = data.children[i].url;
+ if (link.substring(0,1)=='^') {
+ url = link.substring(1);
+ } else {
+ url = relPath+link;
+ }
+ result+='
');
+ $('#main-nav').append(makeTree(menudata,relPath));
+ $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu');
+ if (searchBox) {
+ $('#main-menu').append('');
+ }
+ var $mainMenuState = $('#main-menu-state');
+ var prevWidth = 0;
+ if ($mainMenuState.length) {
+ function initResizableIfExists() {
+ if (typeof initResizable==='function') initResizable();
+ }
+ // animate mobile menu
+ $mainMenuState.change(function(e) {
+ var $menu = $('#main-menu');
+ var options = { duration: 250, step: initResizableIfExists };
+ if (this.checked) {
+ options['complete'] = function() { $menu.css('display', 'block') };
+ $menu.hide().slideDown(options);
+ } else {
+ options['complete'] = function() { $menu.css('display', 'none') };
+ $menu.show().slideUp(options);
+ }
+ });
+ // set default menu visibility
+ function resetState() {
+ var $menu = $('#main-menu');
+ var $mainMenuState = $('#main-menu-state');
+ var newWidth = $(window).outerWidth();
+ if (newWidth!=prevWidth) {
+ if ($(window).outerWidth()<768) {
+ $mainMenuState.prop('checked',false); $menu.hide();
+ $('#searchBoxPos1').html(searchBox);
+ $('#searchBoxPos2').hide();
+ } else {
+ $menu.show();
+ $('#searchBoxPos1').empty();
+ $('#searchBoxPos2').html(searchBox);
+ $('#searchBoxPos2').show();
+ }
+ prevWidth = newWidth;
+ }
+ }
+ $(window).ready(function() { resetState(); initResizableIfExists(); });
+ $(window).resize(resetState);
+ }
+ $('#main-menu').smartmenus();
+}
+/* @license-end */
diff --git a/doc/html/menudata.js b/doc/html/menudata.js
new file mode 100644
index 0000000..9c0f6b1
--- /dev/null
+++ b/doc/html/menudata.js
@@ -0,0 +1,98 @@
+/*
+ @licstart The following is the entire license notice for the JavaScript code in this file.
+
+ The MIT License (MIT)
+
+ Copyright (C) 1997-2020 by Dimitri van Heesch
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ and associated documentation files (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all copies or
+ substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+ BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ @licend The above is the entire license notice for the JavaScript code in this file
+*/
+var menudata={children:[
+{text:"Main Page",url:"index.html"},
+{text:"Related Pages",url:"pages.html"},
+{text:"Data Structures",url:"annotated.html",children:[
+{text:"Data Structures",url:"annotated.html"},
+{text:"Data Fields",url:"functions.html",children:[
+{text:"All",url:"functions.html",children:[
+{text:"a",url:"functions.html#index_a"},
+{text:"b",url:"functions.html#index_b"},
+{text:"c",url:"functions.html#index_c"},
+{text:"d",url:"functions.html#index_d"},
+{text:"e",url:"functions.html#index_e"},
+{text:"f",url:"functions.html#index_f"},
+{text:"h",url:"functions.html#index_h"},
+{text:"i",url:"functions.html#index_i"},
+{text:"k",url:"functions.html#index_k"},
+{text:"l",url:"functions.html#index_l"},
+{text:"m",url:"functions.html#index_m"},
+{text:"n",url:"functions.html#index_n"},
+{text:"o",url:"functions.html#index_o"},
+{text:"p",url:"functions.html#index_p"},
+{text:"q",url:"functions.html#index_q"},
+{text:"s",url:"functions.html#index_s"},
+{text:"t",url:"functions.html#index_t"},
+{text:"u",url:"functions.html#index_u"},
+{text:"v",url:"functions.html#index_v"}]},
+{text:"Variables",url:"functions_vars.html",children:[
+{text:"a",url:"functions_vars.html#index_a"},
+{text:"b",url:"functions_vars.html#index_b"},
+{text:"c",url:"functions_vars.html#index_c"},
+{text:"d",url:"functions_vars.html#index_d"},
+{text:"e",url:"functions_vars.html#index_e"},
+{text:"f",url:"functions_vars.html#index_f"},
+{text:"h",url:"functions_vars.html#index_h"},
+{text:"i",url:"functions_vars.html#index_i"},
+{text:"k",url:"functions_vars.html#index_k"},
+{text:"l",url:"functions_vars.html#index_l"},
+{text:"m",url:"functions_vars.html#index_m"},
+{text:"n",url:"functions_vars.html#index_n"},
+{text:"o",url:"functions_vars.html#index_o"},
+{text:"p",url:"functions_vars.html#index_p"},
+{text:"q",url:"functions_vars.html#index_q"},
+{text:"s",url:"functions_vars.html#index_s"},
+{text:"t",url:"functions_vars.html#index_t"},
+{text:"u",url:"functions_vars.html#index_u"},
+{text:"v",url:"functions_vars.html#index_v"}]}]}]},
+{text:"Files",url:"files.html",children:[
+{text:"File List",url:"files.html"},
+{text:"Globals",url:"globals.html",children:[
+{text:"All",url:"globals.html",children:[
+{text:"a",url:"globals.html#index_a"},
+{text:"i",url:"globals_i.html#index_i"},
+{text:"j",url:"globals_j.html#index_j"},
+{text:"l",url:"globals_l.html#index_l"},
+{text:"p",url:"globals_p.html#index_p"},
+{text:"s",url:"globals_s.html#index_s"},
+{text:"u",url:"globals_u.html#index_u"}]},
+{text:"Functions",url:"globals_func.html",children:[
+{text:"a",url:"globals_func.html#index_a"},
+{text:"j",url:"globals_func.html#index_j"},
+{text:"l",url:"globals_func.html#index_l"},
+{text:"p",url:"globals_func.html#index_p"},
+{text:"s",url:"globals_func.html#index_s"}]},
+{text:"Variables",url:"globals_vars.html"},
+{text:"Typedefs",url:"globals_type.html"},
+{text:"Enumerations",url:"globals_enum.html"},
+{text:"Enumerator",url:"globals_eval.html",children:[
+{text:"j",url:"globals_eval.html#index_j"}]},
+{text:"Macros",url:"globals_defs.html",children:[
+{text:"a",url:"globals_defs.html#index_a"},
+{text:"j",url:"globals_defs.html#index_j"},
+{text:"l",url:"globals_defs.html#index_l"},
+{text:"p",url:"globals_defs.html#index_p"},
+{text:"s",url:"globals_defs.html#index_s"}]}]}]}]}
diff --git a/doc/html/nav_f.png b/doc/html/nav_f.png
new file mode 100644
index 0000000..72a58a5
Binary files /dev/null and b/doc/html/nav_f.png differ
diff --git a/doc/html/nav_g.png b/doc/html/nav_g.png
new file mode 100644
index 0000000..2093a23
Binary files /dev/null and b/doc/html/nav_g.png differ
diff --git a/doc/html/nav_h.png b/doc/html/nav_h.png
new file mode 100644
index 0000000..33389b1
Binary files /dev/null and b/doc/html/nav_h.png differ
diff --git a/doc/html/open.png b/doc/html/open.png
new file mode 100644
index 0000000..30f75c7
Binary files /dev/null and b/doc/html/open.png differ
diff --git a/doc/html/pages.html b/doc/html/pages.html
new file mode 100644
index 0000000..1ae6685
--- /dev/null
+++ b/doc/html/pages.html
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+json-c: Related Pages
+
+
+
+
+
+
+
+
+
+
+
+
+
json-c 0.18
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Related Pages
+
+
+
Here is a list of all related documentation pages:
Internal string buffer handling. Unless you're writing a json_object_to_json_string_fn implementation for use with json_object_set_serializer() direct use of this is not recommended.
+More...
Internal string buffer handling. Unless you're writing a json_object_to_json_string_fn implementation for use with json_object_set_serializer() direct use of this is not recommended.
This is an optimization wrapper around printbuf_memappend() that is useful for appending string literals. Since the size of string constants is known at compile time, using this macro can avoid a costly strlen() call. This is especially helpful when a constant string must be appended many times. If you got here because of a compilation error caused by passing something other than a string literal, use printbuf_memappend_fast() in conjunction with strlen().
This function is the most expensive of the available functions for appending string data to a printbuf and should be used only where convenience is more important than speed. Avoid using this function in high performance code or tight loops; in these scenarios, consider using snprintf() with a static buffer in conjunction with one of the printbuf_*append() functions.
Internal state of the json parser. Do not access any fields of this structure directly. Its definition is published due to historical limitations in the json tokener API, and will be changed to be an opaque type in the future.
+
+
+Generated on Sun Sep 15 2024 16:22:28 for json-c by 1.9.4
+
+
+
diff --git a/doc/html/sync_off.png b/doc/html/sync_off.png
new file mode 100644
index 0000000..3b443fc
Binary files /dev/null and b/doc/html/sync_off.png differ
diff --git a/doc/html/sync_on.png b/doc/html/sync_on.png
new file mode 100644
index 0000000..e08320f
Binary files /dev/null and b/doc/html/sync_on.png differ
diff --git a/doc/html/tab_a.png b/doc/html/tab_a.png
new file mode 100644
index 0000000..3b725c4
Binary files /dev/null and b/doc/html/tab_a.png differ
diff --git a/doc/html/tab_b.png b/doc/html/tab_b.png
new file mode 100644
index 0000000..e2b4a86
Binary files /dev/null and b/doc/html/tab_b.png differ
diff --git a/doc/html/tab_h.png b/doc/html/tab_h.png
new file mode 100644
index 0000000..fd5cb70
Binary files /dev/null and b/doc/html/tab_h.png differ
diff --git a/doc/html/tab_s.png b/doc/html/tab_s.png
new file mode 100644
index 0000000..ab478c9
Binary files /dev/null and b/doc/html/tab_s.png differ
diff --git a/doc/html/tabs.css b/doc/html/tabs.css
new file mode 100644
index 0000000..00d1c60
--- /dev/null
+++ b/doc/html/tabs.css
@@ -0,0 +1 @@
+.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.main-menu-btn{position:relative;display:inline-block;width:36px;height:36px;text-indent:36px;margin-left:8px;white-space:nowrap;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0)}.main-menu-btn-icon,.main-menu-btn-icon:before,.main-menu-btn-icon:after{position:absolute;top:50%;left:2px;height:2px;width:24px;background:#666;-webkit-transition:all .25s;transition:all .25s}.main-menu-btn-icon:before{content:'';top:-7px;left:0}.main-menu-btn-icon:after{content:'';top:7px;left:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon{height:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:before{top:0;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:after{top:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}#main-menu-state{position:absolute;width:1px;height:1px;margin:-1px;border:0;padding:0;overflow:hidden;clip:rect(1px,1px,1px,1px)}#main-menu-state:not(:checked) ~ #main-menu{display:none}#main-menu-state:checked ~ #main-menu{display:block}@media(min-width:768px){.main-menu-btn{position:absolute;top:-99999px}#main-menu-state:not(:checked) ~ #main-menu{display:block}}.sm-dox{background-image:url("tab_b.png")}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:"Lucida Grande","Geneva","Helvetica",Arial,sans-serif;font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:0 1px 1px rgba(255,255,255,0.9);color:#283a5d;outline:0}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace !important;text-align:center;text-shadow:none;background:rgba(255,255,255,0.5);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a span.sub-arrow:before{display:block;content:'+'}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:rgba(162,162,162,0.1)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:white;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:url("tab_b.png");line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:#283a5d transparent transparent transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 12px;background-image:url("tab_s.png");background-repeat:no-repeat;background-position:right;-moz-border-radius:0 !important;-webkit-border-radius:0;border-radius:0 !important}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a:hover span.sub-arrow{border-color:white transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent #fff transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:#fff;-moz-border-radius:5px !important;-webkit-border-radius:5px;border-radius:5px !important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent #555;border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:#555;background-image:none;border:0 !important;color:#555;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent white}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:#fff;height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent #555 transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:#555 transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px !important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:url("tab_b.png")}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:#fff}}
\ No newline at end of file