Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Fastjson
Commits
75c2d33d
Commit
75c2d33d
authored
7 years ago
by
wenshao
Browse files
Options
Download
Email Patches
Plain Diff
bug fixed for JSONObject ordered.
parent
d494ad22
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/com/alibaba/fastjson/serializer/MapSerializer.java
+3
-0
...n/java/com/alibaba/fastjson/serializer/MapSerializer.java
with
3 additions
and
0 deletions
+3
-0
src/main/java/com/alibaba/fastjson/serializer/MapSerializer.java
+
3
-
0
View file @
75c2d33d
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment