-
-
Notifications
You must be signed in to change notification settings - Fork 799
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
JsonReadFeature: Introduce missing features for JSON5 compatibility #707
Comments
Sounds reasonable, as long as these are opt-in features (or, possibly, one JSON5 feature), to be added in |
So, thanks to @pjfanning 's work, 2 number related features needed here are implemented to go in 2.14! |
Ok, so looks like we have 2 things missing:
Of these, hex numbers might be relatively easy to add (esp. for blocking parsers). |
If anyone is interested, filing a separate issue for, say, Hexadecimal number support; adding unit tests (failing, under |
The optional features in the JSON parser allow it be configured to almost be a fully-compatible parser for JSON5.
There's just a few missing features, documented here:
https://stackoverflow.com/questions/68312227/can-the-jackson-parser-be-used-to-parse-json5
Summarised as:
JsonReadFeature.ALLOW_TRAILING_DECIMAL_POINT_FOR_NUMBERS
) #773)JsonReadFeature.ALLOW_LEADING_PLUS_SIGN_FOR_NUMBERS
) #774)I propose that additional Jackson features be added for each of these JSON5 features to allow Jackson to be used as a fully-compliant JSON5 parser.
(#612 was a similar but more specific request, though it seems that feature is already covered)
EDIT: Following work has been done:
JsonReadFeature.ALLOW_TRAILING_DECIMAL_POINT_FOR_NUMBERS
) #773 addsJsonReadFeature.ALLOW_LEADING_DECIMAL_POINT_FOR_NUMBERS
to allow trailing decimal points on numbersJsonReadFeature.ALLOW_LEADING_PLUS_SIGN_FOR_NUMBERS
) #774: addsJsonReadFeature.ALLOW_LEADING_PLUS_SIGN_FOR_NUMBERS
to allow leading plus sign on numbersThe text was updated successfully, but these errors were encountered: