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

Function json_parse_simple

common/json_parse_simple.c:537–549  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

535}
536
537jsmntok_t *json_parse_simple(const tal_t *ctx, const char *input, int len)
538{
539 bool complete;
540 jsmn_parser parser;
541 jsmntok_t *toks = toks_alloc(ctx);
542
543 jsmn_init(&parser);
544
545 if (!json_parse_input(&parser, &toks, input, len, &complete)
546 || !complete)
547 return tal_free(toks);
548 return toks;
549}
550
551const char *jsmntype_to_string(jsmntype_t t)
552{

Callers 15

mainFunction · 0.85
mainFunction · 0.85
test_json_tok_sizeFunction · 0.85
test_json_bad_utf8Function · 0.85
mainFunction · 0.85
mainFunction · 0.85
json_parseFunction · 0.85
init_tablemapFunction · 0.85
get_fullnode_peersFunction · 0.85
getchaininfoFunction · 0.85
get_feerate_floorFunction · 0.85
get_feerateFunction · 0.85

Calls 3

toks_allocFunction · 0.85
json_parse_inputFunction · 0.85
tal_freeFunction · 0.85

Tested by 6

mainFunction · 0.68
test_json_tok_sizeFunction · 0.68
test_json_bad_utf8Function · 0.68
mainFunction · 0.68
mainFunction · 0.68
json_parseFunction · 0.68