| 197 | } |
| 198 | |
| 199 | static 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 | |
| 210 | static void test_toks(const struct json *j, ...) |
| 211 | { |
no test coverage detected