#include <stdbool.h>
#include <stdint.h>
#include "allocator.h"
#include "buff.h"
Go to the source code of this file.
|
hat_json_parser_t * | hat_json_parser_create (hat_allocator_t *a, hat_json_parser_cb_t cb, void *ctx) |
|
hat_json_error_t | hat_json_parser_parse (hat_json_parser_t *p, hat_buff_t *buff) |
|
bool | hat_json_parser_empty (hat_json_parser_t *p) |
|
void | hat_json_parser_destroy (hat_json_parser_t *p) |
|
hat_json_writer_t * | hat_json_writer_create (hat_allocator_t *a, hat_json_writer_cb_t cb, void *ctx) |
|
void | hat_json_writer_write_null (hat_json_writer_t *w) |
|
void | hat_json_writer_write_bool (hat_json_writer_t *w, bool value) |
|
void | hat_json_writer_write_int (hat_json_writer_t *w, int64_t value) |
|
void | hat_json_writer_write_real (hat_json_writer_t *w, double value) |
|
void | hat_json_writer_write_str (hat_json_writer_t *w, char *value, size_t len) |
|
void | hat_json_writer_write_arr (hat_json_writer_t *w) |
|
void | hat_json_writer_write_obj (hat_json_writer_t *w) |
|
void | hat_json_writer_write_end (hat_json_writer_t *w) |
|
void | hat_json_writer_destroy (hat_json_writer_t *w) |
|
◆ HAT_JSON_ERROR
#define HAT_JSON_ERROR (-1) |
◆ HAT_JSON_MAX_DEPTH
#define HAT_JSON_MAX_DEPTH 1024 |
◆ HAT_JSON_SUCCESS
#define HAT_JSON_SUCCESS 0 |
◆ HAT_JSON_TOKEN_ARR
#define HAT_JSON_TOKEN_ARR 5 |
◆ HAT_JSON_TOKEN_ARR_END
#define HAT_JSON_TOKEN_ARR_END 6 |
◆ HAT_JSON_TOKEN_BOOL
#define HAT_JSON_TOKEN_BOOL 1 |
◆ HAT_JSON_TOKEN_INT
#define HAT_JSON_TOKEN_INT 2 |
◆ HAT_JSON_TOKEN_NULL
#define HAT_JSON_TOKEN_NULL 0 |
◆ HAT_JSON_TOKEN_OBJ
#define HAT_JSON_TOKEN_OBJ 7 |
◆ HAT_JSON_TOKEN_OBJ_END
#define HAT_JSON_TOKEN_OBJ_END 9 |
◆ HAT_JSON_TOKEN_OBJ_KEY
#define HAT_JSON_TOKEN_OBJ_KEY 8 |
◆ HAT_JSON_TOKEN_REAL
#define HAT_JSON_TOKEN_REAL 3 |
◆ HAT_JSON_TOKEN_STR
#define HAT_JSON_TOKEN_STR 4 |
◆ hat_json_error_t
◆ hat_json_parser_cb_t
◆ hat_json_parser_t
◆ hat_json_token_t
◆ hat_json_writer_cb_t
typedef hat_json_error_t(* hat_json_writer_cb_t) (char *data, size_t len, void *ctx) |
◆ hat_json_writer_t
◆ hat_json_parser_create()
◆ hat_json_parser_destroy()
◆ hat_json_parser_empty()
◆ hat_json_parser_parse()
◆ hat_json_writer_create()
◆ hat_json_writer_destroy()
◆ hat_json_writer_write_arr()
◆ hat_json_writer_write_bool()
◆ hat_json_writer_write_end()
◆ hat_json_writer_write_int()
◆ hat_json_writer_write_null()
◆ hat_json_writer_write_obj()
◆ hat_json_writer_write_real()
◆ hat_json_writer_write_str()