Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.1
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
Although Jackson does not (and probably should not) do extensive structural transformations to objects during mapping, it would sometimes be useful to allow "unwrapping" (aka inlining) child objects. Such that, for example, something like:
class Bean {
String name;
Point point;
}
could be serialized as
{
"name" : "...",
"x" : 1,
"y" : 1
}
instead of what is produced by default
{
"name" : "...",
"point" : {
"x" : 1,
"y" : 1
}
}
assuming proper settings were used. An annotation-based (applicable to fields and methods; possibly to classes also) approach seems the obvious choice: this could be a new property of @JsonProperty, or a new annotation if need be.
Ah. At this point, this is both the most highly voted open issue, and the second oldest open issue.
Plus given that the oldest one is to be soon implemented (related to earlier implementation of
JACKSON-102), will soon also be the oldest.Which is just to say that I will see if this could be implemented for Jackson 1.8.