diff --git a/src/ca/weblite/codename1/json/JSONObject.java b/src/ca/weblite/codename1/json/JSONObject.java index df9f48a..87a2713 100644 --- a/src/ca/weblite/codename1/json/JSONObject.java +++ b/src/ca/weblite/codename1/json/JSONObject.java @@ -32,6 +32,7 @@ of this software and associated documentation files (the "Software"), to deal import java.util.List; import java.util.Map; + /** * A JSONObject is an unordered collection of name/value pairs. Its * external form is a string wrapped in curly braces with colons between the @@ -1191,6 +1192,9 @@ static String valueToString(Object value) throws JSONException { if (value == null ) { return "null"; } + if (value instanceof Null) { + return value.toString(); + } if (value instanceof JSONString) { Object o; try {