falkreon / Jankson

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

Valid hexadecimal numbers are rejected #69

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\": 0xDEADBEEF } ";
JsonObject obj = jankson.load(src);

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

What happens: A syntax error. Tried to parse '' as a hexadecimal number, but it appears to be invalid.

falkreon commented 1 year ago

I'm able to reproduce both errors, and a test has been added. This should be fixed shortly.

falkreon commented 1 year ago

We're all set! The 1.2.2 release will contain this fix.