diff options
author | Eric Haszlakiewicz <erh+git@nimenees.com> | 2020-06-29 02:14:26 +0000 |
---|---|---|
committer | Eric Haszlakiewicz <erh+git@nimenees.com> | 2020-06-29 02:14:26 +0000 |
commit | f23486a3217ed85ed4a0d7f95a10c4013250c987 (patch) | |
tree | 6fc4828dcec39b42cc1ffcd240060baac6195970 /json_object_private.h | |
parent | 6eac6986c9a734b183e55a80e84fa67e58c637ff (diff) | |
download | json-c-f23486a3217ed85ed4a0d7f95a10c4013250c987.tar.gz |
In the json_tokener_state_number case, explicitly adjust what "number" characters are allowed based on the exact micro-state that we're in, and check for invalid following characters in a different way, to allow a valid json_type_number object to be returned at the top level.
This causes previously failing strings like "123-456" to return a valid json_object with the appropriate value. If you care about the trailing content, call json_tokener_parse_ex() and check the parse end point with json_tokener_get_parse_end().
Diffstat (limited to 'json_object_private.h')
-rw-r--r-- | json_object_private.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/json_object_private.h b/json_object_private.h index d1d782e..e143b46 100644 --- a/json_object_private.h +++ b/json_object_private.h @@ -98,7 +98,6 @@ struct json_object_string void _json_c_set_last_err(const char *err_fmt, ...); -extern const char *json_number_chars; extern const char *json_hex_chars; #ifdef __cplusplus |