summaryrefslogtreecommitdiff
path: root/json.h
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-07-13 12:04:51 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-07-13 12:04:51 +0000
commite5ae2867b2235a976ee51fb6ffbd1e4a04dc1e5f (patch)
tree541a5bc710c8d18889f2e37d40463b7c71fc1046 /json.h
parent680775133a16bc9ba4801784add74ccda9d5e9d9 (diff)
downloadgpsd-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.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/json.h b/json.h
index 92681fdb..a9d87bb2 100644
--- a/json.h
+++ b/json.h
@@ -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 */