mjansson/json

Negative numbers in arrays break the parser

johanokl opened this issue · 2 comments

Works:
JSON: [[100.0,100.0],[100.0,200.0],[200.0,100.0],[200.0,200.0],[150.0,100.0],[150.0,200.0],[250.0,100.0],[250.0,200.0],[200.0,100.0],[200.0,200.0],[300.0,100.0],[300.0,200.0]]
Returns 37 tokens.

Doesn't work:
JSON: [[-100.0,-50.0],[-100.0,50.0],[0.0,-50.0],[0.0,50.0],[-50.0,-50.0],[-50.0,50.0],[50.0,-50.0],[50.0,50.0],[0.0,-50.0],[0.0,50.0],[100.0,-50.0],[100.0,50.0]]
Returns 0 tokens.

Both arrays are marked valid by http://jsonlint.com.

comitted a fix to the number parser in eca4112

Verified as fixed. Thanks.