Closed
Description
Currently @JsonUnwrapped
has no effect on ObjectNode
(or JsonNode
) valued property.
Although in general JsonNode
is to be handled as-is, with minimal changes (unlike POJOs), this seems like one case where property-annotation would sometimes make sense.
Specifically, it'd be great to allow sort "any-getter" alternative, where entries of an ObjectNode
were written as if they were the properties to include without wrapper. Something like, say,
public class Root {
@JsonUnwrapped
public ObjectNode values; // having values of: { "a" : 1, "b" : 3 }
}
would get serialized as
{"a":1,"b":3}
instead of what happens currently
{ "values":{"a":1, "b":3}}
NOTE: this issue is specifically for allowing serialization -- supporting deserialization side would have separate challenges.
Metadata
Metadata
Assignees
Labels
No labels