A serialization error causes an assignment to be sent abnormally #244
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
First off: version 2.11.4 is ancient: please try a newer version (2.17.2 f.ex). |
Beta Was this translation helpful? Give feedback.
-
Ok so this is not a stand-alone reproduction as it relies on 2 framework (Lombok, I think and ... Spring?) but gives better idea of what is happening. While it's not clear how custom deserializer (JacksonXssClean) is registered, I guess it is registered for
and I think this is what is going wrong there. Hope this helps. |
Beta Was this translation helpful? Give feedback.
Ok so this is not a stand-alone reproduction as it relies on 2 framework (Lombok, I think and ... Spring?) but gives better idea of what is happening.
While it's not clear how custom deserializer (JacksonXssClean) is registered, I guess it is registered for
String
values, but it also does not verify that the current token is what it expect -- it just assumes it'd beJsonToken.VALUE_STRING
. Deserializer should check that because that is probably the bug here: you can not deserializeString
from JSON Array like that:and
type
is declared asString
. Callingp.getValueAsString();
on JSON Array value returns eithernull
or String "[" (…