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