| 319 | } |
| 320 | |
| 321 | static void remove_inside_obj(void) |
| 322 | { |
| 323 | jsmntok_t *tok; |
| 324 | struct json *j = json_parse(tmpctx, |
| 325 | "{'1':'one', '2':'two'," |
| 326 | "'3': { '3.1': 'a', '3.2':'b', '3.3':'c' }, " |
| 327 | "'4':'four'}"); |
| 328 | |
| 329 | tok = (jsmntok_t *)json_get_member(j->buffer, j->toks, "3"); |
| 330 | json_tok_remove(&j->toks, tok, tok+1, 1); |
| 331 | test_toks(j, "1", "one", "2", "two", "3", "{", "3.2", "b", "3.3", "c", |
| 332 | "4", "four", NULL); |
| 333 | } |
| 334 | |
| 335 | int main(int argc, char *argv[]) |
| 336 | { |
no test coverage detected