Skip to content
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

parsing numbers with exponent fails #49

Closed
darronschall opened this issue Jul 28, 2010 · 2 comments
Closed

parsing numbers with exponent fails #49

darronschall opened this issue Jul 28, 2010 · 2 comments

Comments

@darronschall
Copy link
Contributor

Originally filed by justintalbot on 2008-05-05T20:47:52

What steps will reproduce the problem?

  1. trace(JSON.decode("[3.6e-01]"));

What is the expected output? What do you see instead?
Expected: 0.36
Instead: "Unexpected e encountered"

What version of the product are you using? On what operating system?
AS 3 on Windows

Please provide any additional information below.
Browsing the source of JSONTokenizer.as reveals that exponents are not
handled at all.

@darronschall
Copy link
Contributor Author

Updated by mikechambers on 2008-07-02T16:51:55

Original ticket set status to Accepted (we converted to open)

@darronschall
Copy link
Contributor Author

Updated by darron.schall on 2008-10-23T02:07:24

JSONTest::testDecodeScientificNegativeExponent demonstrates that "6.02e-23" is
correctly parsed as a number. Also, if you look in JSONTokenizer at line 392 (as of
revision 63) you'll see the code to check for scientific notation in numbers.

Rejecting as invalid - make sure you're using the latest from SVN.

Original ticket set status to Invalid (we converted to closed)

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant