
public class MyPojo {
private int a;
private int b;
@JsonIgnoreProperties
private int c;
// getters and setters
}

ObjectMapper objectMapper = new ObjectMapper();
MyPojo myPojo = objectMapper.readValue(jsonString, MyPojo.class);
![]()

@JsonIgnoreProperties(ignoreUnknown = true)
public class MyPojo {
private int a;
private int b;
private int c;
// getters and setters
}

@JsonIgnoreProperties(value = {"d", "e"})
![]()
7万+

被折叠的 条评论
为什么被折叠?



