diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-07-12 21:24:39 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-07-12 21:24:39 +0000 |
commit | 2d77583582a736b38f0012cc9c315d0b51c3a331 (patch) | |
tree | c7e4fff8e98c7369c629c4038d9c5fa5d297bd01 /json.h | |
parent | 7b06ee55fb57ee3d1695ac3ffcd600c660a414ff (diff) | |
download | gpsd-2d77583582a736b38f0012cc9c315d0b51c3a331.tar.gz |
Make #defines for JSON error codes.
Diffstat (limited to 'json.h')
-rw-r--r-- | json.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -21,6 +21,7 @@ struct json_attr_t { } string; bool *boolean; struct json_array_t *array; + int offset; } addr; union { int integer; @@ -35,4 +36,16 @@ struct json_attr_t { int json_read_object(const char *, char *, const struct json_attr_t *, 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_BADATTR -3 /* unknown attribute name */ +#define JSON_ERR_ATTRLEN -4 /* attribute name too long */ +#define JSON_ERR_NOARRAY -5 /* saw [ when not expecting array */ +#define JSON_ERR_NOBRAK -6 /* array element specified, but no [ */ +#define JSON_ERR_STRLONG -7 /* string value too long */ +#define JSON_ERR_TOKLONG -8 /* token value too long */ +#define JSON_ERR_SUBSTRING -9 /* no strings in array subobjects */ +#define JSON_ERR_BADTRAIL -10 /* garbage while expecting , or } */ +#define JSON_ERR_ARRAYSTART -11 /* didn't find expected array start */ + /* json.h ends here */ |