fastjson序列化乱序问题

1、初始化为有序json对象

JSONObject jsonOrdered= new JSONObject(true);

2、将String对象转换过程中,不要调整顺序

JSONObject jsonOrdered = JSONObject.parseObject(jsonString, Feature.OrderedField);

 

posted on 2017-11-10 14:00  一路前行  阅读(6865)  评论(0编辑  收藏  举报