We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ef7a5e4 commit d0f5607Copy full SHA for d0f5607
1 file changed
JSONObject.java
@@ -164,6 +164,7 @@ public String toString() {
164
* Construct an empty JSONObject.
165
*/
166
public JSONObject() {
167
+ // HashMap is used on purpose to ensure that elements are unordered
168
this.map = new HashMap<String, Object>();
169
}
170
@@ -216,15 +217,15 @@ public JSONObject(JSONTokener x) throws JSONException {
216
217
key = x.nextValue().toString();
218
219
-// The key is followed by ':'.
220
+ // The key is followed by ':'.
221
222
c = x.nextClean();
223
if (c != ':') {
224
throw x.syntaxError("Expected a ':' after a key");
225
226
this.putOnce(key, x.nextValue());
227
-// Pairs are separated by ','.
228
+ // Pairs are separated by ','.
229
230
switch (x.nextClean()) {
231
case ';':
0 commit comments