| 440 | } |
| 441 | |
| 442 | static const char *parse_arr(const char *buffer, |
| 443 | const jsmntok_t *tok, |
| 444 | const char **guide, |
| 445 | va_list *ap) |
| 446 | { |
| 447 | const char *errmsg; |
| 448 | |
| 449 | guide_must_be(guide, '['); |
| 450 | |
| 451 | if (tok->type != JSMN_ARRAY) { |
| 452 | return tal_fmt(tmpctx, "token is not an array: %.*s", |
| 453 | json_tok_full_len(tok), |
| 454 | json_tok_full(buffer, tok)); |
| 455 | } |
| 456 | |
| 457 | errmsg = parse_arrlist(buffer, tok, guide, ap); |
| 458 | if (errmsg) |
| 459 | return errmsg; |
| 460 | |
| 461 | guide_must_be(guide, ']'); |
| 462 | return NULL; |
| 463 | } |
| 464 | |
| 465 | const char *json_scanv(const tal_t *ctx, |
| 466 | const char *buffer, |
no test coverage detected