Details
-
Improvement
-
Status: Open
-
Not a Priority
-
Resolution: Unresolved
-
1.10.0
-
None
Description
This is a known issue for jackson: https://github.com/FasterXML/jackson-core/issues/223
You can see more details: https://github.com/FasterXML/jackson-core/blob/master/src/main/java/com/fasterxml/jackson/core/json/UTF8JsonGenerator.java#L2105
And I also encountered this issue in my production environment. I've figured out a solution to solve this issue. Java's String.getBytes() can deal with UTF-8 encoding well. So we can do it like this:
mapper.writeValueAsString(node).getBytes() instead of
mapper.writeValueAsBytes(node)
Attachments
Issue Links
- links to