MCPcopy Create free account
hub / github.com/ElementsProject/lightning / json_parse_simple

Function json_parse_simple

common/json_parse_simple.c:587–599  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

585}
586
587jsmntok_t *json_parse_simple(const tal_t *ctx, const char *input, int len)
588{
589 bool complete;
590 jsmn_parser parser;
591 jsmntok_t *toks = toks_alloc(ctx);
592
593 jsmn_init(&parser);
594
595 if (!json_parse_input(&parser, &toks, input, len, &complete)
596 || !complete)
597 return tal_free(toks);
598 return toks;
599}
600
601const char *jsmntype_to_string(jsmntype_t t)
602{

Callers 15

mainFunction · 0.85
mainFunction · 0.85
test_json_tok_sizeFunction · 0.85
test_json_bad_utf8Function · 0.85
test_json_deep_nestingFunction · 0.85
do_json_to_s64Function · 0.85
do_json_to_u64Function · 0.85
mainFunction · 0.85
mainFunction · 0.85
json_parseFunction · 0.85
init_tablemapFunction · 0.85
get_fullnode_peersFunction · 0.85

Calls 3

toks_allocFunction · 0.85
json_parse_inputFunction · 0.85
tal_freeFunction · 0.85

Tested by 9

mainFunction · 0.68
test_json_tok_sizeFunction · 0.68
test_json_bad_utf8Function · 0.68
test_json_deep_nestingFunction · 0.68
do_json_to_s64Function · 0.68
do_json_to_u64Function · 0.68
mainFunction · 0.68
mainFunction · 0.68
json_parseFunction · 0.68