1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
#ifndef JSON_MAX_NESTING
# define JSON_MAX_NESTING 2000
#endif
#ifndef JSON_OBJECT_CONTAINER
# define JSON_OBJECT_CONTAINER "objectcontainer"
#endif
#ifndef JSON_ARRAY_CONTAINER
# define JSON_ARRAY_CONTAINER "arraycontainer"
#endif
typedef enum {
JSON_START,
JSON_WITHIN_ARRAY,
JSON_WITHIN_OBJECT
} JSONWithin;
#define JSON_ARRAY 1
#define JSON_OBJECT 2
#define JSON_NULL 3
#define JSON_TRUE 4
#define JSON_FALSE 5
#define JSON_STRING 6
#define JSON_NUMBER 7
domDocument *
JSON_Parse (
char *json, /* Complete text of the json string being parsed */
char *documentElement, /* name of the root element, may be NULL */
int maxnesting,
char **errStr,
int *byteIndex
);
|