We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3cc9570 + c575524 commit 0324c21Copy full SHA for 0324c21
Parse/src/main/java/com/parse/ParseDecoder.java
@@ -71,6 +71,10 @@ public Object decode(Object object) {
71
return convertJSONArrayToList((JSONArray) object);
72
}
73
74
+ if (object == JSONObject.NULL) {
75
+ return null;
76
+ }
77
+
78
if (!(object instanceof JSONObject)) {
79
return object;
80
Parse/src/test/java/com/parse/ParseDecoderTest.java
@@ -73,6 +73,12 @@ public void testNonJSONObject() {
assertSame(obj, ParseDecoder.get().decode(obj));
+ @Test
+ public void testNull() {
+ Object object = ParseDecoder.get().decode(JSONObject.NULL);
+ assertNull(object);
81
82
@Test
83
public void testParseFieldOperations() throws JSONException {
84
JSONObject json = new JSONObject();
0 commit comments