fastjson JsonProperty

pxyaymoc  于 3个月前  发布在  其他
关注(0)|答案(1)|浏览(88)

Does FastJSON support annotation like @JsonProperty like Jackson in order to give custom name to key name of the JSON string ?

eit6fx6z

eit6fx6z1#

com.alibaba.fastjson.annotation.JSONField

https://github.com/alibaba/fastjson/wiki/JSONField

public class Model {
      @JSONField(name="ID")
      private int id;
 
      public int getId() {return id;}
      public void setId(int value) {this.id = id;}
 }

相关问题