| 377 | } |
| 378 | |
| 379 | static const char *parse_obj(const char *buffer, |
| 380 | const jsmntok_t *tok, |
| 381 | const char **guide, |
| 382 | va_list *ap) |
| 383 | { |
| 384 | const char *errmsg; |
| 385 | |
| 386 | guide_must_be(guide, '{'); |
| 387 | |
| 388 | if (tok && tok->type != JSMN_OBJECT) { |
| 389 | return tal_fmt(tmpctx, "token is not an object: %.*s", |
| 390 | json_tok_full_len(tok), |
| 391 | json_tok_full(buffer, tok)); |
| 392 | } |
| 393 | |
| 394 | errmsg = parse_fieldlist(buffer, tok, guide, ap); |
| 395 | if (errmsg) |
| 396 | return errmsg; |
| 397 | |
| 398 | guide_must_be(guide, '}'); |
| 399 | return NULL; |
| 400 | } |
| 401 | |
| 402 | static const char *parse_arrelem(const char *buffer, |
| 403 | const jsmntok_t *tok, |
no test coverage detected