Rizin
unix-like reverse engineering framework and cli tools
|
#include <errno.h>
#include <rz_util/rz_utf8.h>
#include <rz_util/rz_hex.h>
#include <rz_util/rz_json.h>
#include <rz_util/rz_assert.h>
#include <rz_util/rz_pj.h>
Go to the source code of this file.
Macros | |
#define | RZ_JSON_REPORT_ERROR(msg, p) |
Functions | |
static RzJson * | json_new (void) |
static RzJson * | create_json (RzJsonType type, const char *key, RzJson *parent) |
RZ_API void | rz_json_free (RzJson *js) |
static char * | unescape_string (char *s, char **end) |
static char * | skip_block_comment (char *ps) |
static char * | skip_whitespace (char *p) |
static char * | parse_key (const char **key, char *p) |
static char * | parse_value (RzJson *parent, const char *key, char *p) |
RZ_API RzJson * | rz_json_parse (char *text) |
static const RzJson * | rz_json_get_len (const RzJson *json, const char *key, size_t keysize) |
RZ_API const RzJson * | rz_json_get (const RzJson *json, const char *key) |
RZ_API const RzJson * | rz_json_item (const RzJson *json, size_t idx) |
RZ_API const RzJson * | rz_json_get_path (const RzJson *json, const char *path) |
static void | json_pj_recurse (const RzJson *json, PJ *pj, bool with_key) |
RZ_API RZ_OWN char * | rz_json_as_string (const RzJson *json, bool with_key) |
Definition at line 17 of file json_parser.c.
|
static |
Definition at line 28 of file json_parser.c.
References rz_json_t::children, json_new(), rz_json_t::key, key, NULL, type, and rz_json_t::type.
Referenced by parse_value().
|
static |
Definition at line 470 of file json_parser.c.
References rz_json_t::children, rz_json_t::key, rz_json_t::next, rz_json_t::num, pj_a(), pj_b(), pj_d(), pj_end(), pj_ka(), pj_kb(), pj_kd(), pj_kN(), pj_knull(), pj_ko(), pj_ks(), pj_N(), pj_null(), pj_o(), pj_s(), RZ_JSON_ARRAY, RZ_JSON_BOOLEAN, RZ_JSON_DOUBLE, RZ_JSON_INTEGER, RZ_JSON_NULL, RZ_JSON_OBJECT, RZ_JSON_STRING, rz_return_if_fail, rz_json_t::str_value, and rz_json_t::type.
Referenced by rz_json_as_string().
|
static |
Definition at line 192 of file json_parser.c.
References c, key, NULL, p, RZ_JSON_REPORT_ERROR, skip_whitespace(), and unescape_string().
Referenced by parse_value().
Definition at line 225 of file json_parser.c.
References create_json(), ERANGE, key, NULL, rz_json_t::num, p, parse_key(), RZ_JSON_ARRAY, RZ_JSON_BOOLEAN, RZ_JSON_DOUBLE, RZ_JSON_INTEGER, RZ_JSON_NULL, RZ_JSON_OBJECT, RZ_JSON_REPORT_ERROR, RZ_JSON_STRING, skip_whitespace(), st64, rz_json_t::str_value, rz_json_t::type, unescape_string(), and ut64().
Referenced by rz_json_parse().
Definition at line 546 of file json_parser.c.
References json_pj_recurse(), rz_json_t::key, NULL, pj_drain(), pj_ks(), pj_new(), pj_S(), RZ_JSON_STRING, rz_return_val_if_fail, cmd_descs_generate::str, rz_json_t::str_value, and rz_json_t::type.
Referenced by rz_cons_grepbuf().
Definition at line 45 of file json_parser.c.
References rz_json_t::children, free(), p, RZ_JSON_ARRAY, rz_json_free(), RZ_JSON_OBJECT, and rz_json_t::type.
Referenced by deserialize_checkpoints_cb(), deserialize_memory_cb(), deserialize_registers_cb(), meta_load_cb(), rz_json_free(), rz_json_parse(), rz_load_panels_layout(), rz_serialize_spaces_load(), winkd_download_module_and_pdb(), xrefs_load_cb(), and zone_load_cb().
Definition at line 405 of file json_parser.c.
References key, and rz_json_get_len().
Referenced by deserialize_checkpoints_cb(), deserialize_memory_cb(), deserialize_registers_cb(), GetHeapGlobalsOffset(), rz_serialize_analysis_var_load(), winkd_download_module_and_pdb(), and xrefs_load_cb().
|
static |
Definition at line 395 of file json_parser.c.
References rz_json_t::children, rz_json_t::key, key, rz_json_t::next, and NULL.
Referenced by rz_json_get(), and rz_json_get_path().
Definition at line 419 of file json_parser.c.
References key, NULL, path, rz_json_get_len(), rz_json_item(), RZ_JSON_REPORT_ERROR, and ut64().
Referenced by rz_cons_grepbuf().
Definition at line 409 of file json_parser.c.
References rz_json_t::children, setup::idx, rz_json_t::next, and NULL.
Referenced by rz_json_get_path().
Definition at line 382 of file json_parser.c.
References rz_json_t::children, parse_value(), rz_json_free(), and create_tags_rz::text.
Referenced by block_load_cb(), bp_load_cb(), deserialize_checkpoints_cb(), deserialize_memory_cb(), deserialize_registers_cb(), flag_load_cb(), function_load_cb(), GetHeapGlobalsOffset(), global_var_load_cb(), hints_load_cb(), meta_load_cb(), rz_cons_grepbuf(), rz_load_panels_layout(), rz_serialize_spaces_load(), winkd_download_module_and_pdb(), xrefs_load_cb(), and zone_load_cb().
|
static |
Definition at line 142 of file json_parser.c.
References NULL, p, REPEAT, and RZ_JSON_REPORT_ERROR.
Referenced by skip_whitespace().
|
static |
Definition at line 162 of file json_parser.c.
References IS_WHITECHAR, NULL, p, RZ_JSON_REPORT_ERROR, and skip_block_comment().
Referenced by parse_key(), and parse_value().
|
static |
Definition at line 61 of file json_parser.c.
References c, d, test_evm::end, NULL, p, rz_hex_to_byte(), RZ_JSON_REPORT_ERROR, rz_utf8_encode(), and s.
Referenced by parse_key(), and parse_value().