Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions JSONObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ of this software and associated documentation files (the "Software"), to deal
import java.math.BigInteger;
import java.util.Collection;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Iterator;
import java.util.Locale;
import java.util.Map;
Expand All @@ -43,7 +43,7 @@ of this software and associated documentation files (the "Software"), to deal
import java.util.Set;

/**
* A JSONObject is an unordered collection of name/value pairs. Its external
* A JSONObject is an collection of name/value pairs. Its external
* form is a string wrapped in curly braces with colons between the names and
* values, and commas between the values and names. The internal form is an
* object having <code>get</code> and <code>opt</code> methods for accessing
Expand Down Expand Up @@ -154,7 +154,7 @@ public String toString() {
* Construct an empty JSONObject.
*/
public JSONObject() {
this.map = new HashMap<String, Object>();
this.map = new LinkedHashMap<String, Object>();
}

/**
Expand Down Expand Up @@ -240,7 +240,7 @@ public JSONObject(JSONTokener x) throws JSONException {
* the JSONObject.
*/
public JSONObject(Map<?, ?> map) {
this.map = new HashMap<String, Object>();
this.map = new LinkedHashMap<String, Object>();
if (map != null) {
for (final Entry<?, ?> e : map.entrySet()) {
final Object value = e.getValue();
Expand Down