fastfloat / fast_float

Fast and exact implementation of the C++ from_chars functions for number types: 4x to 10x faster than strtod, part of GCC 12, Chromium and WebKit/Safari
Apache License 2.0
1.35k stars 124 forks source link

Allow JSON empty exponent as trailing junk #256

Closed LeszekSwirski closed 1 month ago

LeszekSwirski commented 1 month ago

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.

LeszekSwirski commented 1 month ago

As I mentioneed in #251, I made a mistake in not considering that fast_float is tolerant of trailing characters. Sorry for the churn :grimacing:

lemire commented 1 month ago

Will release as another patch.