diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-07-11 21:54:16 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-07-11 21:54:16 +0000 |
commit | b4eae60c38152d04a43f03b6749441d7e20c1919 (patch) | |
tree | 7b76a3a5a89b65d4dc91d12604fae0bbbbff5991 /json.h | |
parent | b0b1b44e6b6873e5f0116bea235829246e969eaa (diff) | |
download | gpsd-b4eae60c38152d04a43f03b6749441d7e20c1919.tar.gz |
First steps towards parsing JSON arrays.
Diffstat (limited to 'json.h')
-rw-r--r-- | json.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -5,12 +5,13 @@ struct json_attr_t { char *attribute; - enum {integer, real, string, boolean} type; + enum {integer, real, string, boolean, array} type; union { int *integer; double *real; char *string; bool *boolean; + struct json_attr_t *array; } addr; union { int integer; @@ -23,6 +24,6 @@ struct json_attr_t { #define JSON_ATTR_MAX 31 /* max charss in JSON attribute name */ #define JSON_VAL_MAX 63 /* max charss in JSON value part */ -int parse_json(const char *, const struct json_attr_t *); +int json_read_object(const char *, const struct json_attr_t *); /* json.h ends here */ |