diff --git a/src/main/java/com/volmit/iris/util/JSONArray.java b/src/main/java/com/volmit/iris/util/JSONArray.java index 8f7e6fdb4..ed935bcc3 100644 --- a/src/main/java/com/volmit/iris/util/JSONArray.java +++ b/src/main/java/com/volmit/iris/util/JSONArray.java @@ -843,7 +843,7 @@ public class JSONArray implements Iterable */ public JSONArray put(double value) throws JSONException { - Double d = value; + Double d = new Double(value); JSONObject.testValidity(d); this.put(d); return this; @@ -858,7 +858,7 @@ public class JSONArray implements Iterable */ public JSONArray put(int value) { - this.put(value); + this.put(new Integer(value)); return this; } @@ -871,7 +871,7 @@ public class JSONArray implements Iterable */ public JSONArray put(long value) { - this.put(value); + this.put(new Long(value)); return this; } @@ -956,7 +956,7 @@ public class JSONArray implements Iterable */ public JSONArray put(int index, double value) throws JSONException { - this.put(index, value); + this.put(index, new Double(value)); return this; } @@ -975,7 +975,7 @@ public class JSONArray implements Iterable */ public JSONArray put(int index, int value) throws JSONException { - this.put(index, value); + this.put(index, new Integer(value)); return this; } @@ -994,7 +994,7 @@ public class JSONArray implements Iterable */ public JSONArray put(int index, long value) throws JSONException { - this.put(index, value); + this.put(index, new Long(value)); return this; } diff --git a/src/main/java/com/volmit/iris/util/JSONObject.java b/src/main/java/com/volmit/iris/util/JSONObject.java index 91a56aacb..3ab4a6115 100644 --- a/src/main/java/com/volmit/iris/util/JSONObject.java +++ b/src/main/java/com/volmit/iris/util/JSONObject.java @@ -1352,7 +1352,7 @@ public class JSONObject */ public JSONObject put(String key, double value) throws JSONException { - this.put(key, value); + this.put(key, new Double(value)); return this; }