Simple JSON  0.1
A free simple json library for C
simple_json_object.h File Reference
Include dependency graph for simple_json_object.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void sj_object_free (SJson *object)
 free a previously allocated json object More...
 
void sj_object_insert (SJson *object, char *key, SJson *value)
 insert data into a json object More...
 
SJStringsj_object_to_json_string (SJson *object)
 get the json object back as a formatted json string More...
 

Function Documentation

void sj_object_free ( SJson object)

free a previously allocated json object

Parameters
objectthe object to free

Definition at line 100 of file simple_json_object.c.

void sj_object_insert ( SJson object,
char *  key,
SJson value 
)

insert data into a json object

Parameters
objectthe json object to insert into
keythe string to identify the object value with
valuethe value of the key
Note
: this is a no-op if object is not an actual JSON object

Definition at line 58 of file simple_json_object.c.

SJString* sj_object_to_json_string ( SJson object)

get the json object back as a formatted json string

Parameters
objectthe object to convert
Returns
NULL on error, or a string encapsulated ith {}

Definition at line 143 of file simple_json_object.c.