diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2014-09-17 20:35:06 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2014-09-17 20:35:06 -0400 |
commit | f6ed64c9304bc60550370c4bedef100982ce2648 (patch) | |
tree | bf1065481cfcad4714ce5ca098f4966e4edc8b33 | |
parent | a8797f6e4ccc7a2fa3e34510e6928c1c2dd95722 (diff) | |
download | gpsd-f6ed64c9304bc60550370c4bedef100982ce2648.tar.gz |
Typo fixes. All regression tests pass.
-rw-r--r-- | json.c | 8 | ||||
-rw-r--r-- | json.h | 2 |
2 files changed, 5 insertions, 5 deletions
@@ -32,7 +32,7 @@ objects or strings - not reals or integers or floats - as elements (this limitation could be easily removed if required). Third, all elements of an array must be of the same type. - There are separata entry points for beginning a parse of either + There are separate entry points for beginning a parse of either JSON object or a JSON array. JSON "float" quantities are actually stored as doubles. @@ -493,7 +493,7 @@ static int json_internal_read_object(const char *cp, case t_check: if (strcmp(cursor->dflt.check, valbuf) != 0) { json_debug_trace((1, - "Required attribute vakue %s not present.\n", + "Required attribute value %s not present.\n", cursor->dflt.check)); return JSON_ERR_CHECKFAIL; } @@ -517,7 +517,7 @@ static int json_internal_read_object(const char *cp, } good_parse: - /* in case there's another object following, consune trailing WS */ + /* in case there's another object following, consume trailing WS */ while (isspace((unsigned char) *cp)) ++cp; if (end != NULL) @@ -654,7 +654,7 @@ const /*@observer@*/ char *json_error_string(int err) "array element specified, but no [", "string value too long", "token value too long", - "garbage while expecting , or }", + "garbage while expecting comma, }, or ]", "didn't find expected array start", "error while parsing object array", "too many array elements", @@ -87,7 +87,7 @@ void json_enable_debug(int, FILE *); #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_BADTRAIL 9 /* garbage while expecting comma, }, 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 */ |