We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d0f5607 commit 246350bCopy full SHA for 246350b
JSONObject.java
@@ -164,7 +164,12 @@ public String toString() {
164
* Construct an empty JSONObject.
165
*/
166
public JSONObject() {
167
- // HashMap is used on purpose to ensure that elements are unordered
+ // HashMap is used on purpose to ensure that elements are unordered by
168
+ // the specification.
169
+ // JSON tends to be a portable transfer format to allows the container
170
+ // implementations to rearrange their items for a faster element
171
+ // retrieval based on associative access.
172
+ // Therefore, an implementation mustn't rely on the order of the item.
173
this.map = new HashMap<String, Object>();
174
}
175
0 commit comments