diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-07-13 12:04:51 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-07-13 12:04:51 +0000 |
commit | e5ae2867b2235a976ee51fb6ffbd1e4a04dc1e5f (patch) | |
tree | 541a5bc710c8d18889f2e37d40463b7c71fc1046 /json.h | |
parent | 680775133a16bc9ba4801784add74ccda9d5e9d9 (diff) | |
download | gpsd-e5ae2867b2235a976ee51fb6ffbd1e4a04dc1e5f.tar.gz |
Subarray parsing in JSON is working, now to tighten up the validity checks.
Diffstat (limited to 'json.h')
-rw-r--r-- | json.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -35,8 +35,8 @@ struct json_attr_t { int json_read_object(const char *, const struct json_attr_t *, int, const char **end); -#define JSON_ERR_OBSTART -1 /* non-WZ when expecting object start */ -#define JSON_ERR_ATTRSTART -2 /* non-WZ when expecting attrib start */ +#define JSON_ERR_OBSTART -1 /* non-WS when expecting object start */ +#define JSON_ERR_ATTRSTART -2 /* non-WS when expecting attrib start */ #define JSON_ERR_BADATTR -3 /* unknown attribute name */ #define JSON_ERR_ATTRLEN -4 /* attribute name too long */ #define JSON_ERR_NOARRAY -5 /* saw [ when not expecting array */ @@ -46,5 +46,7 @@ int json_read_object(const char *, const struct json_attr_t *, int, const char * #define JSON_ERR_BADTRAIL -9 /* garbage while expecting , or } */ #define JSON_ERR_ARRAYSTART -10 /* didn't find expected array start */ #define JSON_ERR_OBJARR -11 /* error while parsing object array */ +#define JSON_ERR_SUBTOOLONG -12 /* too many array elements */ +#define JSON_ERR_BADSUBTRAIL -13 /* garbage while expecting array comma */ /* json.h ends here */ |