#include <yajl/yajl_common.h>
Go to the source code of this file.
| typedef struct yajl_gen_t* yajl_gen |
an opaque handle to a generator
| enum yajl_gen_status |
generator status codes
| yajl_gen YAJL_API yajl_gen_alloc | ( | const yajl_gen_config * | config, | |
| const yajl_alloc_funcs * | allocFuncs | |||
| ) |
allocate a generator handle
| config | a pointer to a structure containing parameters which configure the behavior of the json generator | |
| allocFuncs | an optional pointer to a structure which allows the client to overide the memory allocation used by yajl. May be NULL, in which case malloc/free/realloc will be used. |
| yajl_gen_status YAJL_API yajl_gen_array_close | ( | yajl_gen | hand | ) |
| yajl_gen_status YAJL_API yajl_gen_array_open | ( | yajl_gen | hand | ) |
| yajl_gen_status YAJL_API yajl_gen_bool | ( | yajl_gen | hand, | |
| int | boolean | |||
| ) |
| void YAJL_API yajl_gen_clear | ( | yajl_gen | hand | ) |
clear yajl's output buffer, but maintain all internal generation state. This function will not "reset" the generator state, and is intended to enable incremental JSON outputing.
| yajl_gen_status YAJL_API yajl_gen_double | ( | yajl_gen | hand, | |
| double | number | |||
| ) |
| void YAJL_API yajl_gen_free | ( | yajl_gen | handle | ) |
free a generator handle
| yajl_gen_status YAJL_API yajl_gen_get_buf | ( | yajl_gen | hand, | |
| const unsigned char ** | buf, | |||
| unsigned int * | len | |||
| ) |
access the null terminated generator buffer. If incrementally outputing JSON, one should call yajl_gen_clear to clear the buffer. This allows stream generation.
| yajl_gen_status YAJL_API yajl_gen_integer | ( | yajl_gen | hand, | |
| long int | number | |||
| ) |
| yajl_gen_status YAJL_API yajl_gen_map_close | ( | yajl_gen | hand | ) |
| yajl_gen_status YAJL_API yajl_gen_map_open | ( | yajl_gen | hand | ) |
| yajl_gen_status YAJL_API yajl_gen_null | ( | yajl_gen | hand | ) |
| yajl_gen_status YAJL_API yajl_gen_number | ( | yajl_gen | hand, | |
| const char * | num, | |||
| unsigned int | len | |||
| ) |
| yajl_gen_status YAJL_API yajl_gen_string | ( | yajl_gen | hand, | |
| const unsigned char * | str, | |||
| unsigned int | len | |||
| ) |
1.5.5