Simple JSON
0.1
A free simple json library for C
|
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "simple_json.h"
#include "simple_json_object.h"
#include "simple_json_list.h"
#include "simple_json_string.h"
#include "simple_json_error.h"
Go to the source code of this file.
Classes | |
struct | SJPair |
an object is a list of key/value pairs More... | |
Functions | |
int | sj_object_check (SJson *json) |
void | sj_pair_free (SJPair *pair) |
SJPair * | sj_pair_new (char *key, SJson *value) |
void | sj_object_insert (SJson *object, char *key, SJson *value) |
insert data into a json object More... | |
SJson * | sj_object_copy (SJson *json) |
SJson * | sj_object_new () |
allocate a new empty json object More... | |
void | sj_object_free (SJson *object) |
free a previously allocated json object More... | |
SJson * | sj_object_get_value (SJson *object, char *key) |
get the json value from an object given a key More... | |
char * | sj_object_get_value_as_string (SJson *object, char *key) |
SJString * | sj_object_to_json_string (SJson *object) |
get the json object back as a formatted json string More... | |
int sj_object_check | ( | SJson * | json | ) |
Definition at line 10 of file simple_json_object.c.
Definition at line 69 of file simple_json_object.c.
void sj_object_free | ( | SJson * | object | ) |
free a previously allocated json object
object | the object to free |
Definition at line 100 of file simple_json_object.c.
get the json value from an object given a key
object | the hson object to get |
key | the key to search by |
Definition at line 116 of file simple_json_object.c.
char* sj_object_get_value_as_string | ( | SJson * | object, |
char * | key | ||
) |
Definition at line 134 of file simple_json_object.c.
insert data into a json object
object | the json object to insert into |
key | the string to identify the object value with |
value | the value of the key |
Definition at line 58 of file simple_json_object.c.
SJson* sj_object_new | ( | ) |
allocate a new empty json object
Definition at line 87 of file simple_json_object.c.
get the json object back as a formatted json string
object | the object to convert |
Definition at line 143 of file simple_json_object.c.
void sj_pair_free | ( | SJPair * | pair | ) |
Definition at line 30 of file simple_json_object.c.
Definition at line 38 of file simple_json_object.c.