将对象转成json。

import com.alibaba.fastjson.JSONObject;

String jsonObj = JSONObject.toJSONString(json);

顺序问题。

在实体类中加入

import com.alibaba.fastjson.annotation.JSONField;

@JSONField(ordinal = 1)

相关文章:

  • 2021-11-24
  • 2021-08-02
  • 2021-12-01
猜你喜欢
  • 2021-09-25
  • 2022-12-23
  • 2021-10-01
  • 2022-12-23
  • 2021-11-30
  • 2021-10-01
  • 2022-12-23
相关资源
相似解决方案