Hex capitalization for JsonWriter should be configurable
See original GitHub issueWe’re seeing inconsistencies between JS’s and Jackson’s representation of non-printable characters embedded in JSON strings. Where JS sends \u001b
, once it goes through Jackson the field holds the string \u001B
, causing all kind of hashing issues.
In https://github.com/FasterXML/jackson-core/blob/efe51e83648ed1b4c33ad1ffd5e2cbee5e0c6091/src/main/java/com/fasterxml/jackson/core/io/CharTypes.java#L7 we find that the hex values are hardcoded as capital A-F
, whereas other representations such as JS’s JSON.stringify
indicate you should use lowercase a-f
instead.
These are used in the standard JsonWriter via https://github.com/FasterXML/jackson-core/blob/94a0e1cab04a218cb189e635727ca803dc56a958/src/main/java/com/fasterxml/jackson/core/JsonStreamContext.java#L331
We would like to see a configuration parameter or recommended approach to overcome this issue.
Seen in 2.13, made from before 2.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (8 by maintainers)
Top GitHub Comments
Implemented via #819; will be in 2.14.0-rc2 (and final 2.14.0)
👋 I can take this one. Thanks for the heads up @pakoito 😃