From 7fdf40c79287a4fef8c302981605ca25b5808221 Mon Sep 17 00:00:00 2001 From: Raul Date: Tue, 22 Jan 2019 15:30:54 +0100 Subject: [PATCH 1/2] Update JSONObject.java --- JSONObject.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/JSONObject.java b/JSONObject.java index a1ed4901c..edf35b615 100644 --- a/JSONObject.java +++ b/JSONObject.java @@ -161,7 +161,7 @@ public String toString() { /** * The map where the JSONObject's properties are kept. */ - private final Map map; + protected final Map map; /** * It is sometimes more convenient and less ambiguous to have a @@ -181,7 +181,7 @@ public JSONObject() { // implementations to rearrange their items for a faster element // retrieval based on associative access. // Therefore, an implementation mustn't rely on the order of the item. - this.map = new HashMap(); + this.map = new LinkedHashMap(); } /** From 45069ca6381d07dfe70be69024e4f0bfab39c6a9 Mon Sep 17 00:00:00 2001 From: Raul Date: Tue, 22 Jan 2019 15:40:36 +0100 Subject: [PATCH 2/2] add dependencies --- JSONObject.java | 1 + 1 file changed, 1 insertion(+) diff --git a/JSONObject.java b/JSONObject.java index edf35b615..7dcff6d40 100644 --- a/JSONObject.java +++ b/JSONObject.java @@ -46,6 +46,7 @@ of this software and associated documentation files (the "Software"), to deal import java.util.ResourceBundle; import java.util.Set; import java.util.regex.Pattern; +import java.util.LinkedHashMap; /** * A JSONObject is an unordered collection of name/value pairs. Its external