| 276 | } |
| 277 | |
| 278 | const char *json_get_id(const tal_t *ctx, |
| 279 | const char *buffer, const jsmntok_t *obj) |
| 280 | { |
| 281 | const jsmntok_t *idtok = json_get_member(buffer, obj, "id"); |
| 282 | if (!idtok) |
| 283 | return NULL; |
| 284 | return tal_strndup(ctx, |
| 285 | json_tok_full(buffer, idtok), |
| 286 | json_tok_full_len(idtok)); |
| 287 | } |
| 288 | |
| 289 | /*----------------------------------------------------------------------------- |
| 290 | JSMN Result Validation Starts |
no test coverage detected