| 228 | } |
| 229 | |
| 230 | static struct json *json_parse(const tal_t * ctx, const char *str) |
| 231 | { |
| 232 | struct json *j = tal(ctx, struct json); |
| 233 | j->buffer = tal_strdup(j, str); |
| 234 | convert_quotes(j->buffer); |
| 235 | j->toks = json_parse_simple(j, j->buffer, strlen(j->buffer)); |
| 236 | assert(j->toks); |
| 237 | j->toks = json_tok_copy(j, j->toks); |
| 238 | return j; |
| 239 | } |
| 240 | |
| 241 | static void test_toks(const struct json *j, ...) |
| 242 | { |
no test coverage detected