fastjson序列化字段重命名@JSONField,实体类字段自定义排序@JSONType

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.annotation.JSONType;
import com.alibaba.fastjson.serializer.SerializerFeature;

@JSONType(orders = { "序号aaa", "服务器bbb"})
public class CameraVO {
  @JSONField(name = "序号aaa")
  private Integer id;
  @JSONField(name = "服务器bbb")
  private String instance;
}

 

posted @ 2020-10-29 14:05  然然1907  阅读(2801)  评论(0编辑  收藏  举报