Home | History | Annotate | Download | only in json

Lines Matching defs:NULL

49         // bogus (but documented) behaviour: returns null rather than the empty object!
52 // returns null rather than an empty array!
105 assertEquals(null, object.optJSONArray("foo"));
106 assertEquals(null, object.optJSONObject("foo"));
136 object.put(null, value);
141 object.get(null);
161 object.put("bar", JSONObject.NULL);
162 assertSame(JSONObject.NULL, object.get("bar"));
168 object.put("foo", (Collection) null);
181 object.putOpt("foo", null);
183 object.putOpt(null, null);
185 object.putOpt(null, "bar");
211 assertEquals(null, object.remove(null));
212 assertEquals(null, object.remove(""));
213 assertEquals(null, object.remove("bar"));
215 assertEquals(null, object.remove("foo"));
380 new JSONObject().put(null, false);
385 new JSONObject().put(null, 0.0d);
390 new JSONObject().put(null, 5);
395 new JSONObject().put(null, 5L);
400 new JSONObject().put(null, "foo");
411 object.put("quux", "null");
417 assertTrue(object.toString().contains("\"quux\":\"null\""));
421 assertEquals("null", object.getString("quux"));
480 assertEquals(null, object.optJSONArray("bar"));
481 assertEquals(null, object.optJSONObject("foo"));
486 object.put("foo", JSONObject.NULL);
487 assertEquals("null", object.getString("foo"));
557 object.put("baz", JSONObject.NULL);
575 assertEquals(JSONObject.NULL, array.get(3));
580 assertEquals(null, object.toJSONArray(null));
583 object.toJSONArray(null);
599 object.put("null", 10);
603 names.put(JSONObject.NULL);
670 // when the object contains an unsupported number, toString returns null!
672 assertEquals(null, object.toString());
710 new JSONObject((JSONTokener) null);
740 new JSONObject((String) null);
756 source.put("a", JSONObject.NULL);
762 assertEquals(JSONObject.NULL, copy.get("a"));
764 assertEquals(null, copy.opt("b"));
769 source.put("a", JSONObject.NULL);
775 assertEquals(JSONObject.NULL, copy.get("a"));
809 object.accumulate(null, 5);
824 object.put("foo", JSONObject.NULL);
825 object.put("bar", (Collection) null);
827 // there are two ways to represent null; each behaves differently!
835 assertTrue(JSONObject.NULL.equals(null)); // guaranteed by javadoc
837 assertEquals(Objects.hashCode(null), JSONObject.NULL.hashCode());
845 assertFalse(object.has(null));
851 assertEquals(null, object.opt(null));
852 assertEquals(false, object.optBoolean(null));
853 assertEquals(Double.NaN, object.optDouble(null));
854 assertEquals(0, object.optInt(null));
855 assertEquals(0L, object.optLong(null));
856 assertEquals(null, object.optJSONArray(null));
857 assertEquals(null, object.optJSONObject(null));
858 assertEquals("", object.optString(null));
859 assertEquals(true, object.optBoolean(null, true));
860 assertEquals(0.0d, object.optDouble(null, 0.0d));
861 assertEquals(1, object.optInt(null, 1));
862 assertEquals(1L, object.optLong(null, 1L));
863 assertEquals("baz", object.optString(null, "baz"));
946 assertEquals("\"\"", JSONObject.quote(null));
974 JSONObject.numberToString(null);
981 assertEquals(JSONObject.NULL, JSONObject.wrap(null));
989 assertEquals(JSONObject.NULL, JSONObject.wrap(JSONObject.NULL));
1038 object.append(null, 5);