Use jackson annotation JsonUnwrapped on a field with name different from its getter
问题 I have a class like: class Car { private Engine myEngine; @JsonProperty("color") private String myColor; @JsonProperty("maxspeed") private int myMaxspeed; @JsonGetter("color") public String getColor() { return myColor; } @JsonGetter("maxspeed") public String getMaxspeed() { return myMaxspeed; } public Engine getEngine() { return myEngine; } } and Engine class like class Engine { @JsonProperty("fueltype") private String myFueltype; @JsonProperty("enginetype") private String myEnginetype;