public class Person {
@JsonProperty("name")
private String name;
@JsonProperty("age")
private int age;
// Getters and setters
}
public class Person {
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
@JsonProperty("birthDate")
private Date birthDate;
// Getter and setter
}
public class Person {
@JsonProperty("name")
private String name;
@JsonProperty("address")
private Address address;
// Getter and setter
}
public class Address {
@JsonProperty("street")
private String street;
@JsonProperty("city")
private String city;
// Getter and setter
}