Hello,
I create a deserializer for match corret subclass of abstract class.
I register the deserializer for `InputMessageContent`.
But when I call `jp.getCodec().readTree<JsonNode>(jp)` in `deserializer(JsonParser jp, DeserializationContext ctxt)`.
It return the parent element which contains `InputMessageContent`.
But If I call jp.nextToken() before, it will works.
It's says:
input:
{"foo": {"a": "value", "b": "something"}}
type define:
class Foo{
InputMessageContent foo;
}
@JsonDeserialize(using = InputMessageContentDeserializer.class)
class InputMessageContent{
String a;
String b;
}
Output:
jp.getCodes().readTree(jp).toString()=="{"foo": {"a": "value", "b": "something"}}"
//I wish it should be "{"a": "value", "b": "something"}" <--- If I call jp.nextToken() before.
In fact, I'm use Kotlin for this.
The source code is long:
Thank you.
iseki