falkreon / Jankson

JSON5 / HJSON parser and preprocessor which preserves ordering and comments
MIT License
51 stars 9 forks source link

Also doesn't accept hexadecimal numbers with leading zeroes #70

Closed gamma-delta closed 1 year ago

gamma-delta commented 1 year ago

Using Jankson 1.2.1.

MVE:

Jankson jankson = Jankson.builder().build;
String src = " { \"foo\": 0x00FF00 } ";
JsonObject obj = jankson.load(src);

Expected behavior: A json object with 0xff00 in it.

What happens: A syntax error. This example throws Found unexpected character '}' while looking for the colon (':') between a key and a value in an object but I've also had it throw other things in other examples.

falkreon commented 1 year ago

Let's concentrate this discussion in #69 as a hexadecimal number parsing issue.