field.name
property is used to set the field name for output/input purposes when the field name in JSON differs from the field name in the class.#Support for Jackson annotations
field.name=@com.fasterxml.jackson.annotation.JsonProperty#value
#Support for Gson annotations
field.name=@com.google.gson.annotations.SerializedName#value
TestJsonFieldBean.java
public class TestJsonFieldBean {
@JsonProperty("a")
private Long propertyA;
@SerializedName("b")
private Long propertyB;
//constructors...
//getters...
}
name | type | required | default | desc | other |
---|---|---|---|---|---|
a | integer | optional | mock: @natural(0,10000) | ||
b | integer | optional | mock: @natural(0,10000) |