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

Numbers in E notation aren't supported by the JSON parser #8

Open
lopter opened this issue Jan 4, 2016 · 0 comments
Open

Numbers in E notation aren't supported by the JSON parser #8

lopter opened this issue Jan 4, 2016 · 0 comments

Comments

@lopter
Copy link
Owner

lopter commented Jan 4, 2016

lightsd parses floats manually so they can be stored in integers but fails to support numbers in E notation, which are part of the JSON standard.

The following functions should be fixed first:

Since I guess the E notation will mostly be triggered by client code doing float operations that tend towards 0.

But eventually everything number parsing above jsmn is affected in lightsd and should be fixed according to the JSON grammar:

number
    int
    int frac
    int exp
    int frac exp 
int
    digit
    digit1-9 digits
    - digit
    - digit1-9 digits 
frac
    . digits
exp
    e digits
digits
    digit
    digit digits
e
    e
    e+
    e-
    E
    E+
    E-
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