|
|
|
|
|
|
|
|
Value: char *key; struct json_object *val; \ for(struct lh_entry *entry = json_object_get_object(obj)->head; ({ if(entry) { key = (char*)entry->k; val = (struct json_object*)entry->v; } ; entry; }); entry = entry->next )
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
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
|
|
||||||||||||
|
Get the element at specificed index of the array (a json_object of type json_type_array)
|
|
|
Get the length of a json_object of type json_type_array
|
|
||||||||||||||||
|
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.
|
|
|
Increment the reference count of json_object
|
|
|
Get the arraylist of a json_object of type json_type_array
|
|
|
Get the boolean value of a json_object The type is coerced to a boolean if the passed object is not a boolean. integer and double objects will return FALSE if there value is zero or TRUE otherwise. If the passed object is a string it will return TRUE if it has a non zero length. If any other object type is passed TRUE will be returned if the object is not NULL.
|
|
|
Get the double 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 dboule conversion. Strings will be parsed as a double. If no conversion exists then 0.0 is returned.
|
|
|
Get the int value of a json_object 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.
|
|
|
Get the hashtable of a json_object of type json_type_object
|
|
|
Get the string value of a json_object If the passed object is not of type json_type_string then the JSON representation of the object is returned. The returned string memory is managed by the json_object and will be freed when the reference count of the json_object drops to zero.
|
|
|
Get the type of the json_object
|
|
||||||||||||
|
Check if the json_object is of a given type
|
|
|
Create a new empty json_object of type json_type_array
|
|
|
Create a new empty json_object of type json_type_boolean
|
|
|
Create a new empty json_object of type json_type_double
|
|
|
Create a new empty json_object of type json_type_int
|
|
|
Create a new empty object
|
|
|
Create a new empty json_object of type json_type_string A copy of the string is made and the memory is managed by the json_object
|
|
||||||||||||
|
|
|
||||||||||||||||
|
Add an object field to a json_object of type json_type_object 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
|
|
||||||||||||
|
Delete the given json_object field The reference count will be decremented for the deleted object
|
|
||||||||||||
|
Get the json_object associate with a given object field
|
|
|
Decrement the reference count of json_object and free if it reaches zero
|
|
|
Stringify object to json format
|
|
|
|
|
|
|
1.2.15