-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Delegating creator fails to work for binary data (byte[]
) with binary formats (CBOR, Smile)
#1711
Comments
Thank you for reporting this. It could be either due to binary codecs, or databind not handling the case for some reason -- the way binary codecs expose binary content does differ from that of textual ones: whereas JSON parser has no way of knowing that a JSON String encodes |
Yes, I can reproduce this as shown. |
byte[]
) with binary formats (CBOR, Smile)
Interesting. Turns out that delegating-creator case was not covered for |
…low handling via `DeserializationProblemHandler`
Jackson Versions: 2.8.9, 2.9.0.pr4
This issue might belong to jackson-dataformats-binary.
I created a class which is basically a wrapper around a byte[], using
@JsonValue
and@JsonCreator
.This works fine using the default JsonFactory, however when using a SimleFactory or CBORFactory (and probably others) the deserialization fails: It returns a byte[] instead of the expected target class (which causes a ClassCastException in the calling code).
This problem only occurs with byte[]. Other types such as int[], String[] or byte[][] are fine.
The text was updated successfully, but these errors were encountered: