Home
last modified time | relevance | path

Searched refs:JSONObject (Results 1 – 11 of 11) sorted by relevance

/libcore/json/src/test/java/org/json/
DJSONObjectTest.java40 JSONObject object = new JSONObject(); in testEmptyObject()
109 JSONObject a = new JSONObject(); in testEqualsAndHashCode()
110 JSONObject b = new JSONObject(); in testEqualsAndHashCode()
118 JSONObject object = new JSONObject(); in testGet()
142 JSONObject object = new JSONObject(); in testPut()
155 object.put("bar", JSONObject.NULL); in testPut()
156 assertSame(JSONObject.NULL, object.get("bar")); in testPut()
160 JSONObject object = new JSONObject(); in testPutNullRemoves()
173 JSONObject object = new JSONObject(); in testPutOpt()
184 JSONObject object = new JSONObject(); in testPutOptUnsupportedNumbers()
[all …]
DParsingTest.java40 assertParsed(JSONObject.NULL, "null"); in testParsingLiterals()
41 assertParsed(JSONObject.NULL, "NULL"); in testParsingLiterals()
224 private JSONObject object(Object... keyValuePairs) throws JSONException { in object()
225 JSONObject result = new JSONObject(); in object()
256 } else if (input instanceof JSONObject) { in canonicalize()
257 JSONObject object = (JSONObject) input; in canonicalize()
264 } else if (input == null || input.equals(JSONObject.NULL)) { in canonicalize()
265 return JSONObject.NULL; in canonicalize()
DJSONStringerTest.java34 stringer.value(JSONObject.NULL); in testValueJSONNull()
227 assertEquals("\"" + escaped + "\"", JSONObject.quote(original)); in assertEscapedAllWays()
241 JSONObject object = new JSONObject(); in testJSONObjectAsValue()
327 JSONObject object = new JSONObject(); in testMaxDepthWithObjectValue()
DJSONArrayTest.java141 array.put(0, JSONObject.NULL); in testNulls()
146 assertEquals(JSONObject.NULL, array.get(0)); in testNulls()
162 assertEquals(JSONObject.NULL, array.opt(0)); in testNulls()
184 assertEquals(JSONObject.NULL, array.get(1)); in testParseNullYieldsJSONObjectNull()
310 array.put(new JSONObject(Collections.singletonMap("x", 6))); in testJoin()
333 JSONObject object = values.toJSONObject(keys); in testToJSONObject()
352 JSONObject object = values.toJSONObject(keys); in testToJSONObjectWithNulls()
364 JSONObject object = values.toJSONObject(keys); in testToJSONObjectMoreNamesThanValues()
375 JSONObject object = values.toJSONObject(keys); in testToJSONObjectMoreValuesThanNames()
382 keys.put(JSONObject.NULL); in testToJSONObjectNullKey()
[all …]
DSelfUseTest.java42 private final JSONObject object = new JSONObject() {
43 @Override public JSONObject put(String name, Object value) throws JSONException {
/libcore/json/src/main/java/org/json/
DJSONObject.java80 public class JSONObject { class
113 public JSONObject() { in JSONObject() method in JSONObject
126 public JSONObject(Map copyFrom) { in JSONObject() method in JSONObject
151 public JSONObject(JSONTokener readFrom) throws JSONException { in JSONObject() method in JSONObject
157 if (object instanceof JSONObject) { in JSONObject()
158 this.nameValuePairs = ((JSONObject) object).nameValuePairs; in JSONObject()
172 public JSONObject(String json) throws JSONException { in JSONObject() method in JSONObject
181 public JSONObject(JSONObject copyFrom, String[] names) throws JSONException { in JSONObject() method in JSONObject
204 public JSONObject put(String name, boolean value) throws JSONException { in put()
217 public JSONObject put(String name, double value) throws JSONException { in put()
[all …]
DJSONArray.java73 put(JSONObject.wrap(it.next())); in JSONArray()
121 put(JSONObject.wrap(Array.get(array, i))); in JSONArray()
275 return value == null || value == JSONObject.NULL; in isNull()
520 public JSONObject getJSONObject(int index) throws JSONException { in getJSONObject()
522 if (object instanceof JSONObject) { in getJSONObject()
523 return (JSONObject) object; in getJSONObject()
533 public JSONObject optJSONObject(int index) { in optJSONObject()
535 return object instanceof JSONObject ? (JSONObject) object : null; in optJSONObject()
545 public JSONObject toJSONObject(JSONArray names) throws JSONException { in toJSONObject()
546 JSONObject result = new JSONObject(); in toJSONObject()
DJSONStringer.java236 } else if (value instanceof JSONObject) { in value()
237 ((JSONObject) value).writeTo(this); in value()
245 || value == JSONObject.NULL) { in value()
249 out.append(JSONObject.numberToString((Number) value)); in value()
284 out.append(JSONObject.numberToString(value)); in value()
DJSONTokener.java286 return JSONObject.NULL; in readLiteral()
349 private JSONObject readObject() throws JSONException { in readObject()
350 JSONObject result = new JSONObject(); in readObject()
/libcore/benchmarks/src/benchmarks/regression/
DParseBenchmark.java30 import org.json.JSONObject;
181 new JSONObject(data); in parse()
/libcore/
Dnon_openjdk_java_files.mk235 json/src/main/java/org/json/JSONObject.java \