| 468 | return cson_object_set(obj, key, NULL); |
| 469 | } |
| 470 | cson_value *cson_object_get(cson_object *obj, char const *key) |
| 471 | { |
| 472 | cson__render(obj->value); |
| 473 | char path[strlen(key) + 3]; |
| 474 | sprintf(path, "$.%s", key); |
| 475 | cson_get *get = cson__get(obj->value, path); |
| 476 | if (!get) { |
| 477 | return NULL; |
| 478 | } |
| 479 | LIST_INSERT_HEAD(&obj->get_list, get, entry); |
| 480 | return get->value; |
| 481 | } |
| 482 | cson_value *cson_value_new_array(void) |
| 483 | { |
| 484 | cson_value *val = calloc(1, sizeof(cson_value)); |