Add function to traverse json tree and free all memory allocations

This commit is contained in:
2023-07-01 16:45:31 +01:00
parent 135a6da54c
commit f9e9f0ebd8
4 changed files with 59 additions and 10 deletions

View File

@@ -65,6 +65,7 @@ struct json_collection {
};
void print_json(const jentity_t *entity, u32 indent);
void free_json(jentity_t **entity);
jcoll_t *get_collection_from_entity(const jentity_t *entity);
jentity_t *create_new_single_entity(const jval_t value, jentity_t *parent);
jentity_t *create_new_pair_entity(dstr_t *key, const jval_t value,