FastJson乱序问题

 

1、初始化为有序json对象

JSONObject jsonOrdered= new JSONObject(true);

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

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

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

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

猜你喜欢

转载自www.cnblogs.com/CHWLearningNotes/p/9364677.html