New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Have we made a mistake by forbidding exponential notation? #10
Comments
For scientific software you might work with large numbers. Forbidding exponential notation might mean adding 300 insignificant digits to your json file. Worst case your file could be composed of 99% useless data. |
If you had to choose between not allowing exponential notation or allowing only exponential notation, for machine-to-machine communication it makes more sense to me to choose the latter, honestly. It's a far more natural representation of floating point data. |
I second the call to allow only exponential notation. This is very much needed in engineering. For readability, i would use engineering notation (exponent are signed multiples of 3) , but that's debatable. In other notes i wouldn't recommend disallowing trailing zeros. These are used to convey information about precision (significant figures). While that can be done in other ways, it's often unknown, if trailing zeros represent significance or not and information could be accidentially thrown away. |
@impact27: Good point, I'll think about that some more. The current simplicity of the EBNF and railroad diagram would be sad to give up, but we would definitely gain something from it. @mwerezak: JSON Numbers aren't floats (though they can represent them), and I don't want to privilege floats over any of the other things they can represent. @Shorty66: You're looking for a different project from Son. I share your feelings and think it would have been great if the various JSON parsers in the wild respected that |
If anyone using JSON requires exponential notation please let me know here.
The text was updated successfully, but these errors were encountered: