hello Jackson Dev
We use Jackson to serialize and deserialize some of our data. Sometimes bad data get's in (from other codepaths), leading to exceptions like the two examples below. I looked at the docs/code, I don't see any way currently to configure Jackson to either throw exception, ignore it, or possibly substitute in an "unknown character glyph". This would be similar to the functionality that JDK CharsetDecoder has, with onUnmappableCharacter(). This would be a desirable feature because, while obviously we'd like to not have bad data, it's not always something that can be purged or handled on a large scale, especially when starting with an existing data set.
Is this in any current plan, and if not, would you accept code contribution? Who would be the contact person for this?
Thanks,
Zhenkai
Caused by: java.io.IOException: Broken surrogate pair: first char 0xd83c, second 0x2e; illegal combination
at org.codehaus.jackson.io.UTF8Writer.convertSurrogate(UTF8Writer.java:364)
at org.codehaus.jackson.io.UTF8Writer.write(UTF8Writer.java:185)
at org.codehaus.jackson.impl.WriterBasedGenerator._flushBuffer(WriterBasedGenerator.java:1050)
at org.codehaus.jackson.impl.WriterBasedGenerator._writeString(WriterBasedGenerator.java:751)
at org.codehaus.jackson.impl.WriterBasedGenerator.writeString(WriterBasedGenerator.java:207)
at com.linkedin.data.codec.JacksonDataCodec$JsonTraverseCallback.stringValue(JacksonDataCodec.java:340)
at com.linkedin.data.Data.traverse(Data.java:281)
at com.linkedin.data.Data.traverse(Data.java:302)
at com.linkedin.data.Data.traverse(Data.java:322)
at com.linkedin.data.Data.traverse(Data.java:302)
at com.linkedin.data.Data.traverse(Data.java:302)
at com.linkedin.data.Data.traverse(Data.java:302)
at com.linkedin.data.Data.traverse(Data.java:302)
at com.linkedin.data.codec.JacksonDataCodec.writeObject(JacksonDataCodec.java:202)
at com.linkedin.data.codec.JacksonDataCodec.objectToBytes(JacksonDataCodec.java:116)
at com.linkedin.data.codec.JacksonDataCodec.mapToBytes(JacksonDataCodec.java:92)
or
java.io.IOException: Unmatched second part of surrogate pair (0xdc78)
at org.codehaus.jackson.io.UTF8Writer.throwIllegal(UTF8Writer.java:379)
at org.codehaus.jackson.io.UTF8Writer.write(UTF8Writer.java:178)
at org.codehaus.jackson.impl.WriterBasedGenerator._writeSegment(WriterBasedGenerator.java:862)
at org.codehaus.jackson.impl.WriterBasedGenerator._writeLongString(WriterBasedGenerator.java:821)
at org.codehaus.jackson.impl.WriterBasedGenerator._writeString(WriterBasedGenerator.java:744)
at org.codehaus.jackson.impl.WriterBasedGenerator.writeString(WriterBasedGenerator.java:207)
at com.linkedin.data.codec.JacksonDataCodec$JsonTraverseCallback.stringValue(JacksonDataCodec.java:222)
--
You received this message because you are subscribed to the Google Groups "jackson-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jackson-dev...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.