-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Coercion of incomplete floats (eg.1.
)
#146
Comments
Humm, I think the behaviour we have now is fine. I think it’s perfectly reasonable for |
or presumably |
I think the correct thing to do is drop any incomplete number. The thing is that |
I believe Let me explain:
For some context, im using An assumption I'd like to make is that when Of course I could enforce this myself by detecting when a parsed dictionary drops a key and then just readd the previous parse, but I thought it would be reasonable to add this to |
The point above is that we think it would be better to remove the jump by having the parse be undefined until we're sure the number is terminated. Agreed that the
Yes, I think we agree with this too 👍 In our proposal, the parse would change to:
|
I've noticed that when iteratively parsing a json stream character by character 'incomplete' floats are 'stepped' over:
prints the following output:
I'd suggest to coerce
1.
into the float1.0
(or expose an option to enable that)The text was updated successfully, but these errors were encountered: