| 350 | } |
| 351 | |
| 352 | static void remove_inside_obj(void) |
| 353 | { |
| 354 | jsmntok_t *tok; |
| 355 | struct json *j = json_parse(tmpctx, |
| 356 | "{'1':'one', '2':'two'," |
| 357 | "'3': { '3.1': 'a', '3.2':'b', '3.3':'c' }, " |
| 358 | "'4':'four'}"); |
| 359 | |
| 360 | tok = (jsmntok_t *)json_get_member(j->buffer, j->toks, "3"); |
| 361 | json_tok_remove(&j->toks, tok, tok+1, 1); |
| 362 | test_toks(j, "1", "one", "2", "two", "3", "{", "3.2", "b", "3.3", "c", |
| 363 | "4", "four", NULL); |
| 364 | } |
| 365 | |
| 366 | int main(int argc, char *argv[]) |
| 367 | { |
no test coverage detected