mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-03 08:55:41 +02:00
A container object makes the state transitions more straightforward
And should make it possible to free an object that has just been read and still know what the next state will be, importantly.
This commit is contained in:
+12
-1
@@ -13,7 +13,18 @@ typedef struct json_object {
|
||||
struct json_object **keys;
|
||||
struct json_object **values;
|
||||
int length;
|
||||
|
||||
int expect;
|
||||
} json_object;
|
||||
|
||||
json_object *json_parse(FILE *f, json_object *current, char **error);
|
||||
struct json_pull {
|
||||
json_object *container;
|
||||
char *error;
|
||||
FILE *f;
|
||||
};
|
||||
typedef struct json_pull json_pull;
|
||||
|
||||
json_pull *json_begin(FILE *f);
|
||||
json_object *json_parse(json_pull *j);
|
||||
|
||||
json_object *json_hash_get(json_object *o, char *s);
|
||||
|
||||
Reference in New Issue
Block a user