11 Commits

Author SHA1 Message Date
Anders Dalvander
1e188d9715 add missing json test 2024-11-21 00:08:47 +01:00
Anders Dalvander
43a428d658 remove feature macro from tests 2024-11-21 00:08:43 +01:00
Daniel Lemire
5ad6aae0b1 lint 2024-08-14 09:57:47 -04:00
Leszek Swirski
b6ce2c4de6 Record parse failure reason and location
In parse_number_string, if there is a parse error, report the specific
error as one of the values in a new parse_error enum, and update
lastmatch to match the error location. This allows users of the library
to print more helpful error messages for invalid inputs.
2024-07-23 18:11:10 +02:00
Leszek Swirski
e6777f2eef Allow JSON empty exponent as trailing junk
Revert #251, and instead allow an invalid trailing empty exponent to be
treated as junk data in JSON parsing. Expand the test suite to test this
case, including testing the trailing junk.
2024-07-23 14:56:42 +02:00
Leszek Swirski
b57207c811 Disallow empty exponent in JSON parsing
The JSON spec requires at least one digit in the exponential part, if
specified.
2024-07-22 12:34:58 +02:00
Daniel Lemire
7646f819a8 Merge branch 'main' of github.com:allenbarnett5/fast_float_ftn into fortran 2023-09-15 09:43:27 -04:00
Maya Warrier
7b1fc2f95d Add an option to allow inf/nan even in json mode
- Most JSON parsers offer this option too
2023-09-14 21:07:22 -04:00
Maya Warrier
ce562d9c65 Disallow inf/nan in json mode 2023-09-14 20:51:26 -04:00
Maya Warrier
2395482ad5 Ignore FASTFLOAT_ALLOWS_LEADING_PLUS for JSON format 2023-09-14 19:50:21 -04:00
Maya Warrier
4de8d715e6 Add json fmt test 2023-09-13 21:07:40 -04:00