| 400 | } |
| 401 | |
| 402 | static const char *parse_arrelem(const char *buffer, |
| 403 | const jsmntok_t *tok, |
| 404 | const char **guide, |
| 405 | va_list *ap) |
| 406 | { |
| 407 | const jsmntok_t *member; |
| 408 | u32 idx; |
| 409 | |
| 410 | parse_number(guide, &idx); |
| 411 | guide_must_be(guide, ':'); |
| 412 | |
| 413 | member = json_get_arr(tok, idx); |
| 414 | if (!member) { |
| 415 | return tal_fmt(tmpctx, "token has no index %u: %.*s", |
| 416 | idx, |
| 417 | json_tok_full_len(tok), |
| 418 | json_tok_full(buffer, tok)); |
| 419 | } |
| 420 | |
| 421 | return parse_fieldval(buffer, member, guide, ap); |
| 422 | } |
| 423 | |
| 424 | static const char *parse_arrlist(const char *buffer, |
| 425 | const jsmntok_t *tok, |
no test coverage detected