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

Function json_parse

common/test/run-json_remove.c:199–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197}
198
199static struct json *json_parse(const tal_t * ctx, const char *str)
200{
201 struct json *j = tal(ctx, struct json);
202 j->buffer = tal_strdup(j, str);
203 convert_quotes(j->buffer);
204 j->toks = json_parse_simple(j, j->buffer, strlen(j->buffer));
205 assert(j->toks);
206 j->toks = json_tok_copy(j, j->toks);
207 return j;
208}
209
210static void test_toks(const struct json *j, ...)
211{

Callers 8

sanityFunction · 0.70
remove_oneFunction · 0.70
remove_firstFunction · 0.70
remove_lastFunction · 0.70
remove_multipleFunction · 0.70
remove_allFunction · 0.70
remove_complexFunction · 0.70
remove_inside_objFunction · 0.70

Calls 3

json_tok_copyFunction · 0.85
convert_quotesFunction · 0.70
json_parse_simpleFunction · 0.50

Tested by

no test coverage detected