chl
99d8fc975e
Tightening the number parsing algorithm
...
Some badly formated "numbers" could get partly parsed,
resulting in truncated results instead of raising an
error.
Examples :
'1.2.3' -> (double)1.2
'2015-01-15' -> (int)2015
This patch is not perfect (ex: input can still end with a 'E', which
is forbidden by json.org doc) but should avoid non-sensically
formated input.
Tests added.
2015-02-05 01:50:37 +01:00
Eric Haszlakiewicz
05da316b9c
Issue #103 : allow Infinity and -Infinity to be parsed.
2014-03-22 17:28:40 -04:00
Eric Haszlakiewicz
0eedf3802f
Issue#102 - add support for parsing "NaN".
2014-03-09 16:41:33 -04:00
Eric Haszlakiewicz
e8161a11bb
Issue #15 : add a way to set a JSON_TOKENER_STRICT flag to forbid commas at the end of arrays and objects.
2013-03-31 20:05:36 -05:00
Eric Haszlakiewicz
ca8b27d183
Enable -Werror and fix a number of minor warnings that existed.
2013-02-09 16:35:24 -06:00
Eric Haszlakiewicz
c3068bfd09
Reformat the test sources. No functional change.
2012-09-16 20:43:29 -05:00
Eric Haszlakiewicz
92f31bd99a
Handle the \f escape sequence (the two characters: backslash followed by an f, not a literal formfeed) and extend the test_parse test to check all valid escape sequences.
2012-07-29 12:31:07 -05:00
Eric Haszlakiewicz
c1b8891a13
Move the rest of the tests into the tests subdirectory.
2012-04-22 10:33:41 -05:00