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_list.h"
#include "simple_json_array.h"
#include "simple_json_error.h"
Go to the source code of this file.
Functions | |
int | sj_array_check (SJson *json) |
SJson * | sj_array_copy (SJson *json) |
SJson * | sj_array_new () |
allocate a new empty json array More... | |
void | sj_array_free (SJson *array) |
int | sj_array_get_count (SJson *array) |
get the number of elements in the json array More... | |
void | sj_array_append (SJson *array, SJson *value) |
append to a JSON array a new value More... | |
SJson * | sj_array_get_nth (SJson *array, int n) |
retrieve the nth element in the json array More... | |
SJString * | sj_array_get_nth_as_string (SJson *array, int n) |
retrieve the nth element in the json array assumed to be a string More... | |
SJString * | sj_array_to_json_string (SJson *array) |
get the contents of the array as a formatted json string for output More... | |
append to a JSON array a new value
array | the JSON array to append to |
value | the value to add to the string |
Definition at line 72 of file simple_json_array.c.
int sj_array_check | ( | SJson * | json | ) |
Definition at line 9 of file simple_json_array.c.
Definition at line 20 of file simple_json_array.c.
void sj_array_free | ( | SJson * | array | ) |
Definition at line 51 of file simple_json_array.c.
int sj_array_get_count | ( | SJson * | array | ) |
get the number of elements in the json array
array | the json array |
Definition at line 66 of file simple_json_array.c.
retrieve the nth element in the json array
array | the array to search through |
n | the index of the element to get |
Definition at line 79 of file simple_json_array.c.
retrieve the nth element in the json array assumed to be a string
array | the array to search through |
n | the index of the element to get |
Definition at line 85 of file simple_json_array.c.
SJson* sj_array_new | ( | ) |
allocate a new empty json array
Definition at line 38 of file simple_json_array.c.
get the contents of the array as a formatted json string for output
array | the json array to convert |
Definition at line 95 of file simple_json_array.c.