16 if(
object == NULL ) {
20 for(
unsigned i = 0; ( error ==
JST_ERR_NONE )&&( i < object->count ); ++i ) {
23 free( object->
items );
24 object->parent = NULL;
45 for(
unsigned i = 0; ( error ==
JST_ERR_NONE )&&( i < array->count ); ++i ) {
56 if( element == NULL ) {
59 switch( element->
type ) {
struct JST_Pair_ ** items
Array of JST_Pair, ordered by JST_Pair.name to ease search with bsearch()
char * name
This property's name.
A object attribute item has a parent and is a named-typed-value pair.
An array item has a parent and a typed value.
A JSON object, a sorted set of named-value pairs.
JST_Error JST_delete_array(JST_Array *array)
An element is a typed value.
JST_Error JST_delete_pair(JST_Pair *pair)
JST_Error JST_delete_array_item(JST_ArrayItem *item)
struct JST_ArrayItem_ ** items
Array of JST_ArrayItem.
JST_Error JST_delete_object(JST_Object *object)
JST_Error JST_delete_element(JST_Element *element)
unsigned count
Cardinality of the previous array.
struct JST_Element_ * parent
of type JST_ArrayItem or JST_Pair, case selector is parent->type
JST_Element element
The value associated with the name.