I'm using Jackson for creating Java objects from JSON. Let's suppose I have a JSON string like this:
{"a":"a", "b":"b", "c":"c"}
And a pojo like this:
@JsonIgnoreProperties(ignoreUnknown = true)
public class A {
private String a;
private String b;
// ...
}
So c is clearly an unknown property - and it will be left out. I was wondering, is there any way I can log that c was unknown and ignored?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…