|
ujson
Complete and simple JSON reader and writer written in C
|
Common JSON reader/writer definitions. More...
Go to the source code of this file.
Macros | |
| #define | UJSON_ERR_MAX 128 |
| Maximal error message length. | |
| #define | UJSON_ID_MAX 64 |
| Maximal id string lenght including terminating null element. | |
| #define | UJSON_RECURSION_MAX 128 |
| Maximal recursion depth allowed. | |
| #define | UJSON_ARRAY_SIZE(array) (sizeof(array) / sizeof(*array)) |
| An array size macro. | |
Enumerations | |
| enum | ujson_type { UJSON_VOID = 0 , UJSON_INT , UJSON_FLOAT , UJSON_BOOL , UJSON_NULL , UJSON_STR , UJSON_OBJ , UJSON_ARR } |
| A JSON data type. More... | |
Functions | |
| const char * | ujson_type_name (enum ujson_type type) |
| Returns type name. More... | |
| void | ujson_err_handler (void *print_priv, const char *line) |
| Default error print handler. More... | |
Common JSON reader/writer definitions.
Definition in file ujson_common.h.
| enum ujson_type |
A JSON data type.
Definition at line 27 of file ujson_common.h.
| void ujson_err_handler | ( | void * | print_priv, |
| const char * | line | ||
| ) |
Default error print handler.
| print_priv | A json buffer print_priv pointer. |
| line | A line of text to be printed. |
| const char* ujson_type_name | ( | enum ujson_type | type | ) |
Returns type name.
| type | A json type. |