Commit 75c2d33d authored by wenshao's avatar wenshao
Browse files

bug fixed for JSONObject ordered.

parent d494ad22
Showing with 3 additions and 0 deletions
+3 -0
......@@ -45,6 +45,9 @@ public final class MapSerializer implements ObjectSerializer {
&& map.containsKey(JSON.DEFAULT_TYPE_KEY);
if ((out.features & SerializerFeature.SortField.mask) != 0) {
if (map instanceof JSONObject) {
map = ((JSONObject) map).getInnerMap();
}
if ((!(map instanceof SortedMap)) && !(map instanceof LinkedHashMap)) {
try {
map = new TreeMap(map);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment