Closed michael-g closed 5 years ago
According to RFC-8259 numbers consists of an integer that might be followed by a fraction part. This means that {"myfloat":.5}
is not a valid JSON string in the eyes of that standard.
Ah, right. Apologies, I had misremembered the state transition table of http://www.json.org/JSON_checker/JSON_checker.c; at line 158 it does not transition from value (VA
) to fraction (FR
) [edit: on seeing a .
input]. I'll update my Ragel recogniser appropriately ;)
Just reading your docs -- haven't read the source or used the library -- but presumably since a valid number may be e.g.
{"myfloat":.5}
, the first character of that primitive token could be a full-stop, not just the ones you note:[-0-9]
?