-
Notifications
You must be signed in to change notification settings - Fork 39
Closed
Description
Hello,
It seems jsony json parser has issue parsing some floats with E scientific notation.
Here's the minimal exemple code to reproduce the issue:
import jsony
import std/json
let s = r"""[9e-8]"""
#echo s
echo parseJson(s) # std json parse works
echo fromJson(s) # Invalid float. At offset: 5 [JsonError]Some running context:
- Nim Compiler Version 1.6.0 [Windows: amd64]
- jsony installed with
nimble install jsonytoday (2021-11-04) - throw in release or debug mode, no other compiler flags used
The Issue
The payload [9e-8] is a valid json and std/json or python json parser handle it without raising errors.
Jsony should be able to parse it successfully.
Please note that, for now, I only encoutered this error with this specific value 9e-8.
Other values parsed with jsony (even those in E scientific notation) are successfully parsed.
Regards.
Metadata
Metadata
Assignees
Labels
No labels