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; }
有疑问加w,dreamingmymoon