Skip to content

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

@lopter

Description

@lopter

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-

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions