Searched refs:JSONObject (Results 1 – 12 of 12) sorted by relevance
/libcore/json/src/test/java/libcore/org/json/ |
D | JSONObjectTest.java | 37 import org.json.JSONObject; 46 JSONObject object = new JSONObject(); in testEmptyObject() 115 JSONObject a = new JSONObject(); in testEqualsAndHashCode() 116 JSONObject b = new JSONObject(); in testEqualsAndHashCode() 124 JSONObject object = new JSONObject(); in testGet() 148 JSONObject object = new JSONObject(); in testPut() 161 object.put("bar", JSONObject.NULL); in testPut() 162 assertSame(JSONObject.NULL, object.get("bar")); in testPut() 166 JSONObject object = new JSONObject(); in testPutNullRemoves() 179 JSONObject object = new JSONObject(); in testPutOpt() [all …]
|
D | ParsingTest.java | 29 import org.json.JSONObject; 45 assertParsed(JSONObject.NULL, "null"); in testParsingLiterals() 46 assertParsed(JSONObject.NULL, "NULL"); in testParsingLiterals() 229 private JSONObject object(Object... keyValuePairs) throws JSONException { in object() 230 JSONObject result = new JSONObject(); in object() 261 } else if (input instanceof JSONObject) { in canonicalize() 262 JSONObject object = (JSONObject) input; in canonicalize() 269 } else if (input == null || input.equals(JSONObject.NULL)) { in canonicalize() 270 return JSONObject.NULL; in canonicalize()
|
D | JSONStringerTest.java | 23 import org.json.JSONObject; 39 stringer.value(JSONObject.NULL); in testValueJSONNull() 232 assertEquals("\"" + escaped + "\"", JSONObject.quote(original)); in assertEscapedAllWays() 246 JSONObject object = new JSONObject(); in testJSONObjectAsValue() 332 JSONObject object = new JSONObject(); in testMaxDepthWithObjectValue()
|
D | JSONArrayTest.java | 27 import org.json.JSONObject; 146 array.put(0, JSONObject.NULL); in testNulls() 151 assertEquals(JSONObject.NULL, array.get(0)); in testNulls() 167 assertEquals(JSONObject.NULL, array.opt(0)); in testNulls() 189 assertEquals(JSONObject.NULL, array.get(1)); in testParseNullYieldsJSONObjectNull() 315 array.put(new JSONObject(Collections.singletonMap("x", 6))); in testJoin() 338 JSONObject object = values.toJSONObject(keys); in testToJSONObject() 357 JSONObject object = values.toJSONObject(keys); in testToJSONObjectWithNulls() 369 JSONObject object = values.toJSONObject(keys); in testToJSONObjectMoreNamesThanValues() 380 JSONObject object = values.toJSONObject(keys); in testToJSONObjectMoreValuesThanNames() [all …]
|
D | SelfUseTest.java | 23 import org.json.JSONObject; 47 private final JSONObject object = new JSONObject() { 48 @Override public JSONObject put(String name, Object value) throws JSONException {
|
/libcore/json/src/main/java/org/json/ |
D | JSONObject.java | 85 public class JSONObject { class 122 public JSONObject() { in JSONObject() method in JSONObject 135 public JSONObject(@NonNull Map copyFrom) { in JSONObject() method in JSONObject 160 public JSONObject(@NonNull JSONTokener readFrom) throws JSONException { in JSONObject() method in JSONObject 166 if (object instanceof JSONObject) { in JSONObject() 167 this.nameValuePairs = ((JSONObject) object).nameValuePairs; in JSONObject() 181 public JSONObject(@NonNull String json) throws JSONException { in JSONObject() method in JSONObject 190 …public JSONObject(@NonNull JSONObject copyFrom, @NonNull String @NonNull [] names) throws JSONExce… in JSONObject() method in JSONObject 213 @NonNull public JSONObject put(@NonNull String name, boolean value) throws JSONException { in put() 226 @NonNull public JSONObject put(@NonNull String name, double value) throws JSONException { in put() [all …]
|
D | JSONArray.java | 75 put(JSONObject.wrap(it.next())); in JSONArray() 123 put(JSONObject.wrap(Array.get(array, i))); in JSONArray() 277 return value == null || value == JSONObject.NULL; in isNull() 522 public JSONObject getJSONObject(int index) throws JSONException { in getJSONObject() 524 if (object instanceof JSONObject) { in getJSONObject() 525 return (JSONObject) object; in getJSONObject() 535 public JSONObject optJSONObject(int index) { in optJSONObject() 537 return object instanceof JSONObject ? (JSONObject) object : null; in optJSONObject() 547 public JSONObject toJSONObject(JSONArray names) throws JSONException { in toJSONObject() 548 JSONObject result = new JSONObject(); in toJSONObject()
|
D | JSONStringer.java | 245 } else if (value instanceof JSONObject) { in value() 246 ((JSONObject) value).writeTo(this); in value() 254 || value == JSONObject.NULL) { in value() 258 out.append(JSONObject.numberToString((Number) value)); in value() 293 out.append(JSONObject.numberToString(value)); in value()
|
D | JSONTokener.java | 294 return JSONObject.NULL; in readLiteral() 359 private JSONObject readObject() throws JSONException { in readObject() 360 JSONObject result = new JSONObject(); in readObject()
|
/libcore/ |
D | nullability_annotated_classes.txt | 6 org.json.JSONObject
|
D | non_openjdk_java_files.bp | 70 "json/src/main/java/org/json/JSONObject.java",
|
/libcore/mmodules/core_platform_api/api/legacy_platform/ |
D | current-api.txt | 1182 public class JSONObject {
|