question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JSON's Exponential Number could not parse.

See original GitHub issue

I’m using JSON parser and when an included number of Exponential as long, it could not parse with skipping. (e.f 12345e3 just like 12,345,000) But JSON’s specification is supported a number of exponential notation. Therefore should it parse with built-in JSON parser plugin?

{ "double":-1.234e-5, "string":"string","long":12345e3, "boolean":true }
Skipped an invalid record (Failed to parse '1.2345E7' as long)

Thanks,

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
dmikurubecommented, Sep 4, 2017

Although I know it’s a kind of bugs, I’m afraid “fixing” this may break some compatibilities. Depending on the investigation in JsonParser.java, we may delay fixing this until v0.9.

0reactions
dmikurubecommented, Sep 7, 2017

@smdmts Thanks. We’d keep this issue open so that we can have a deeper look later.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why and how JSON Parse of an exponential value gives a ...
The argument that is given to toPrecision defines the desired number of precision (aka "scientific precision" or number of digits (not ...
Read more >
Unable to parse scientific notation in JSON file using ... - GitHub
JSON method fails when parsing a JSON file which has numbers in scientific notation. Scientific numbers appear to be valid JSON according to ......
Read more >
JSON large integer to string without scientific notation
Hi,. we are receiving a json payload that includes a large number (ie 33333333333333333). Whenever we pass it through common tools in an ......
Read more >
SyntaxError: JSON.parse: bad parsing - JavaScript | MDN
JSON.parse() parses a string as JSON. This string has to be valid JSON and will throw this error if incorrect syntax was encountered....
Read more >
Why does jsonencode parser does not remove exponential ...
I have the same problem; the receiving API will not accept "e" in numbers. I understand this is legitimate JSON encoding, so there...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found