diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-07-14 01:16:22 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-07-14 01:16:22 +0000 |
commit | 7e08262809ec75e4bca0c31308f889c21c55e359 (patch) | |
tree | 44918940bb97a2906c1410fc90d4f224a24e4c48 /json.h | |
parent | fd19d4685df2b4d5bff0bfc19a0c507e6722536b (diff) | |
download | gpsd-7e08262809ec75e4bca0c31308f889c21c55e359.tar.gz |
JSON error-handling cleanup.
Diffstat (limited to 'json.h')
-rw-r--r-- | json.h | 30 |
1 files changed, 15 insertions, 15 deletions
@@ -47,20 +47,20 @@ int json_read_object(const char *, const struct json_attr_t *, int, const char * int json_read_array(const char *, const struct json_array_t *, const char **); const char *json_error_string(int); -#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 */ -#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_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 */ -#define JSON_ERR_SUBTYPE -14 /* unsupported array element type */ -#define JSON_ERR_BADSTRING -15 /* error while string parsing */ +#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 */ +#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_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 */ +#define JSON_ERR_SUBTYPE 14 /* unsupported array element type */ +#define JSON_ERR_BADSTRING 15 /* error while string parsing */ /* json.h ends here */ |