I think Jackson does method based serialization, is there any way I could make it field based?
Ex:
class Bean {
Integer i;
String s;
public Integer getI() { return this.i; }
public void setI(Integer i) { this.i = i; }
public bool isSetI() { return this.i != null; }
// same for s as well
}
The output JSON has "i" and "setI". Is there anyway I could override this to get only "i"? Also it would be great if there was a way to do this without adding any annotations to the class (they are auto generated).