| 338 | } |
| 339 | |
| 340 | static void remove_complex(void) |
| 341 | { |
| 342 | struct json *j = json_parse(tmpctx, |
| 343 | "{'1':'one', '2':'two'," |
| 344 | "'3': { '3.1': 'a', '3.2':'b', '3.3':'c' }, " |
| 345 | "'4': { '4.1': 'a', '4.2':'b', '4.3':'c' }, " |
| 346 | "'5':'five'}"); |
| 347 | |
| 348 | json_tok_remove(&j->toks, j->toks, j->toks + 5, 2); |
| 349 | test_toks(j, "1", "one", "2", "two", "5", "five", NULL); |
| 350 | } |
| 351 | |
| 352 | static void remove_inside_obj(void) |
| 353 | { |
no test coverage detected