]> granicus.if.org Git - json-c/commit
In the json_tokener_state_number case, explicitly adjust what "number" characters...
authorEric Haszlakiewicz <erh+git@nimenees.com>
Mon, 29 Jun 2020 02:14:26 +0000 (02:14 +0000)
committerEric Haszlakiewicz <erh+git@nimenees.com>
Mon, 29 Jun 2020 02:14:26 +0000 (02:14 +0000)
commitf23486a3217ed85ed4a0d7f95a10c4013250c987
tree6fc4828dcec39b42cc1ffcd240060baac6195970
parent6eac6986c9a734b183e55a80e84fa67e58c637ff
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().
ChangeLog
json_object.c
json_object_private.h
json_tokener.c
tests/test_parse.c
tests/test_parse.expected