| 229 | } |
| 230 | |
| 231 | const char *json_get_id(const tal_t *ctx, |
| 232 | const char *buffer, const jsmntok_t *obj) |
| 233 | { |
| 234 | const jsmntok_t *idtok = json_get_member(buffer, obj, "id"); |
| 235 | if (!idtok) |
| 236 | return NULL; |
| 237 | return tal_strndup(ctx, |
| 238 | json_tok_full(buffer, idtok), |
| 239 | json_tok_full_len(idtok)); |
| 240 | } |
| 241 | |
| 242 | /*----------------------------------------------------------------------------- |
| 243 | JSMN Result Validation Starts |
no test coverage detected