Suppose I have a pojo:
import org.codehaus.jackson.map.*; public class MyPojo { int id; public int getId() { return this.id; } public void
To achieve this you need to use the JsonTypeInfo annotation on your class and in particular WRAPPER_OBJECT
JsonTypeInfo
@JsonTypeName("foo") @JsonTypeInfo(include = JsonTypeInfo.As.WRAPPER_OBJECT ,use = JsonTypeInfo.Id.NAME) public class Bar(){ )