/external/mobly-bundled-snippets/src/main/java/com/google/android/mobly/snippet/bundled/utils/ |
D | JsonDeserializer.java | 43 public static WifiConfiguration jsonToWifiConfig(JSONObject jsonObject) throws JSONException { in jsonToWifiConfig() argument 45 config.SSID = "\"" + jsonObject.getString("SSID") + "\""; in jsonToWifiConfig() 46 config.hiddenSSID = jsonObject.optBoolean("hiddenSSID", false); in jsonToWifiConfig() 47 if (jsonObject.has("password")) { in jsonToWifiConfig() 49 config.preSharedKey = "\"" + jsonObject.getString("password") + "\""; in jsonToWifiConfig() 57 public static AdvertiseSettings jsonToBleAdvertiseSettings(JSONObject jsonObject) in jsonToBleAdvertiseSettings() argument 60 if (jsonObject.has("AdvertiseMode")) { in jsonToBleAdvertiseSettings() 61 int mode = MbsEnums.BLE_ADVERTISE_MODE.getInt(jsonObject.getString("AdvertiseMode")); in jsonToBleAdvertiseSettings() 65 if (jsonObject.has("Timeout")) { in jsonToBleAdvertiseSettings() 66 builder.setTimeout(jsonObject.getInt("Timeout")); in jsonToBleAdvertiseSettings() [all …]
|
/external/exoplayer/tree_8e57d3715f9092d5ec54ebe2e538f34bfcc34479/library/transformer/src/androidTest/java/com/google/android/exoplayer2/transformer/ |
D | TransformationTestResult.java | 126 JSONObject jsonObject = new JSONObject(); in asJsonObject() local 128 jsonObject.put("durationMs", transformationResult.durationMs); in asJsonObject() 131 jsonObject.put("fileSizeBytes", transformationResult.fileSizeBytes); in asJsonObject() 134 jsonObject.put("averageAudioBitrate", transformationResult.averageAudioBitrate); in asJsonObject() 137 jsonObject.put("averageVideoBitrate", transformationResult.averageVideoBitrate); in asJsonObject() 140 jsonObject.put("videoFrameCount", transformationResult.videoFrameCount); in asJsonObject() 143 jsonObject.put("throughputFps", throughputFps); in asJsonObject() 146 jsonObject.put("elapsedTimeMs", elapsedTimeMs); in asJsonObject() 149 jsonObject.put("ssim", ssim); in asJsonObject() 152 jsonObject.put("analysisException", AndroidTestUtil.exceptionAsJsonObject(analysisException)); in asJsonObject() [all …]
|
/external/vogar/src/vogar/monitor/ |
D | TargetMonitor.java | 67 JsonObject jsonObject = new JsonObject(); 68 jsonObject.addProperty("outcome", outcomeName); 69 writer.print(marker + gson.toJson(jsonObject) + "\n"); 77 JsonObject jsonObject = new JsonObject(); 78 jsonObject.addProperty("result", result.name()); 79 writer.print(marker + gson.toJson(jsonObject) + "\n"); 87 JsonObject jsonObject = new JsonObject(); 88 jsonObject.addProperty("completedNormally", completedNormally); 89 writer.print(marker + gson.toJson(jsonObject) + "\n");
|
D | HostMonitor.java | 123 JsonObject jsonObject = (JsonObject) o; in followProcess() local 124 if (jsonObject.get("outcome") != null) { in followProcess() 125 currentOutcome = jsonObject.get("outcome").getAsString(); in followProcess() 128 } else if (jsonObject.get("result") != null) { in followProcess() 129 Result currentResult = Result.valueOf(jsonObject.get("result").getAsString()); in followProcess() 133 } else if (jsonObject.get("completedNormally") != null) { in followProcess() 134 completedNormally = jsonObject.get("completedNormally").getAsBoolean(); in followProcess()
|
/external/jetpack-camera-app/core/camera/src/main/java/com/google/jetpackcamera/core/camera/ |
D | DebugCameraInfoUtil.kt | 60 val jsonObject = JSONObject() in <lambda>() constant 64 jsonObject.put( in <lambda>() 71 jsonObject.put( in <lambda>() 78 jsonObject.put( in <lambda>() 87 jsonObject.put( in <lambda>() 95 ?.let { jsonObject.put(CameraCharacteristics.CONTROL_ZOOM_RATIO_RANGE.name, it) } in <lambda>() 99 jsonObject.put( in <lambda>() 106 jsonObject.put( in <lambda>() 113 jsonObject.put( in <lambda>() 119 return jsonObject in <lambda>()
|
/external/gson/gson/src/test/java/com/google/gson/internal/bind/ |
D | JsonTreeReaderTest.java | 48 JsonObject jsonObject = new JsonObject(); in testSkipValue_filledJsonObject() local 52 jsonObject.add("a", jsonArray); in testSkipValue_filledJsonObject() 53 jsonObject.addProperty("b", true); in testSkipValue_filledJsonObject() 54 jsonObject.addProperty("i", 1); in testSkipValue_filledJsonObject() 55 jsonObject.add("n", JsonNull.INSTANCE); in testSkipValue_filledJsonObject() 58 jsonObject.add("o", jsonObject2); in testSkipValue_filledJsonObject() 59 jsonObject.addProperty("s", "text"); in testSkipValue_filledJsonObject() 60 JsonTreeReader in = new JsonTreeReader(jsonObject); in testSkipValue_filledJsonObject() 68 JsonObject jsonObject = new JsonObject(); in testSkipValue_name() local 69 jsonObject.addProperty("a", "value"); in testSkipValue_name() [all …]
|
/external/mobly-snippet-lib/third_party/sl4a/src/main/java/com/google/android/mobly/snippet/rpc/ |
D | MethodDescriptor.java | 205 private static Object buildIntent(JSONObject jsonObject) throws JSONException { in buildIntent() argument 207 if (jsonObject.has("action")) { in buildIntent() 208 intent.setAction(jsonObject.getString("action")); in buildIntent() 210 if (jsonObject.has("data") && jsonObject.has("type")) { in buildIntent() 212 Uri.parse(jsonObject.optString("data", null)), in buildIntent() 213 jsonObject.optString("type", null)); in buildIntent() 214 } else if (jsonObject.has("data")) { in buildIntent() 215 intent.setData(Uri.parse(jsonObject.optString("data", null))); in buildIntent() 216 } else if (jsonObject.has("type")) { in buildIntent() 217 intent.setType(jsonObject.optString("type", null)); in buildIntent() [all …]
|
/external/exoplayer/tree_15dc86382f17a24a3e881e52e31a810c1ea44b49/library/rtsp/src/test/java/com/google/android/exoplayer2/source/rtsp/ |
D | RtpPacketStreamDump.java | 65 JSONObject jsonObject = new JSONObject(jsonString); in parse() local 66 String trackName = jsonObject.getString("trackName"); in parse() 67 int firstSequenceNumber = jsonObject.getInt("firstSequenceNumber"); in parse() 68 long firstTimestamp = jsonObject.getLong("firstTimestamp"); in parse() 69 long transmissionIntervalMs = jsonObject.getLong("transmitIntervalMs"); in parse() 70 String mediaDescription = jsonObject.getString("mediaDescription"); in parse() 73 JSONArray jsonPackets = jsonObject.getJSONArray("packets"); in parse()
|
/external/exoplayer/tree_8e57d3715f9092d5ec54ebe2e538f34bfcc34479/library/rtsp/src/test/java/com/google/android/exoplayer2/source/rtsp/ |
D | RtpPacketStreamDump.java | 65 JSONObject jsonObject = new JSONObject(jsonString); in parse() local 66 String trackName = jsonObject.getString("trackName"); in parse() 67 int firstSequenceNumber = jsonObject.getInt("firstSequenceNumber"); in parse() 68 long firstTimestamp = jsonObject.getLong("firstTimestamp"); in parse() 69 long transmissionIntervalMs = jsonObject.getLong("transmitIntervalMs"); in parse() 70 String mediaDescription = jsonObject.getString("mediaDescription"); in parse() 73 JSONArray jsonPackets = jsonObject.getJSONArray("packets"); in parse()
|
/external/tink/java_src/src/test/java/com/google/crypto/tink/internal/ |
D | JsonParserTest.java | 76 public static JsonObject jsonObject(String name, JsonElement value) { in jsonObject() method in JsonParserTest 94 new TestCase("map", "{\"a\":\"b\"}", jsonObject("a", new JsonPrimitive("b"))), 100 new TestCase("map_with_empty_key", "{\"\":\"a\"}", jsonObject("", new JsonPrimitive("a"))), 123 jsonObject( 125 jsonObject( 127 jsonObject( 129 jsonObject( 131 jsonObject( 133 jsonObject( 135 jsonObject( [all …]
|
/external/tink-java/src/test/java/com/google/crypto/tink/internal/ |
D | JsonParserTest.java | 76 public static JsonObject jsonObject(String name, JsonElement value) { in jsonObject() method in JsonParserTest 94 new TestCase("map", "{\"a\":\"b\"}", jsonObject("a", new JsonPrimitive("b"))), 100 new TestCase("map_with_empty_key", "{\"\":\"a\"}", jsonObject("", new JsonPrimitive("a"))), 123 jsonObject( 125 jsonObject( 127 jsonObject( 129 jsonObject( 131 jsonObject( 133 jsonObject( 135 jsonObject( [all …]
|
/external/javaparser/javaparser-core-serialization/src/main/java/com/github/javaparser/serialization/ |
D | JavaParserJsonDeserializer.java | 51 JsonObject jsonObject = reader.readObject(); in deserializeObject() local 52 return deserializeObject(jsonObject); in deserializeObject() 147 JsonObject jsonObject = (JsonObject)jsonValue; in readRange() local 149 jsonObject.getInt(JsonRange.BEGIN_LINE.propertyKey), in readRange() 150 jsonObject.getInt(JsonRange.BEGIN_COLUMN.propertyKey) in readRange() 153 jsonObject.getInt(JsonRange.END_LINE.propertyKey), in readRange() 154 jsonObject.getInt(JsonRange.END_COLUMN.propertyKey) in readRange() 164 JsonObject jsonObject = (JsonObject)jsonValue; in readTokenRange() local 166 JsonTokenRange.BEGIN_TOKEN.propertyKey, jsonObject in readTokenRange() 169 JsonTokenRange.END_TOKEN.propertyKey, jsonObject in readTokenRange() [all …]
|
/external/kotlinx.serialization/guide/example/ |
D | example-json-29.kt | 20 val jsonObject = element.jsonObject in transformDeserialize() constant 21 return if ("basic-name" in jsonObject) { in transformDeserialize() 22 val nameElement = jsonObject["basic-name"] ?: throw IllegalStateException() in transformDeserialize() 25 jsonObject in transformDeserialize()
|
D | example-json-18.kt | 15 .jsonObject["forks"]!! in main() 16 .jsonArray.sumOf { it.jsonObject["votes"]?.jsonPrimitive?.int ?: 0 } in main()
|
/external/kotlinx.serialization/formats/json-tests/commonTest/src/kotlinx/serialization/json/serializers/ |
D | JsonTreeTest.kt | 54 val third = array[2].jsonObject in testJsonObjectWithArrays() 93 assertFailsWith<NoSuchElementException> { tree.getValue("no key").jsonObject } in testExceptionalState() 95 assertEquals(null, tree["no key"]?.jsonObject) in testExceptionalState() 120 val jsonObject: Map<String, JsonElement> = JsonObject( in testThatJsonObjectsCompareWithMaps() constant 145 assertEquals(jsonObject, hashMap) in testThatJsonObjectsCompareWithMaps() 146 assertEquals(hashMap, jsonObject) in testThatJsonObjectsCompareWithMaps() 147 assertEquals(jsonObject.hashCode(), hashMap.hashCode()) in testThatJsonObjectsCompareWithMaps() 148 assertNotEquals(jsonObject, otherHashMap) in testThatJsonObjectsCompareWithMaps() 149 assertNotEquals(jsonObject, otherJsonObject) in testThatJsonObjectsCompareWithMaps()
|
/external/sl4a/Common/src/com/googlecode/android_scripting/rpc/ |
D | MethodDescriptor.java | 243 public static Object buildIntent(JSONObject jsonObject) throws JSONException { in buildIntent() argument 245 if (jsonObject.has("action")) { in buildIntent() 246 intent.setAction(jsonObject.getString("action")); in buildIntent() 248 if (jsonObject.has("data") && jsonObject.has("type")) { in buildIntent() 249 intent.setDataAndType(Uri.parse(jsonObject.optString("data", null)), in buildIntent() 250 jsonObject.optString("type", null)); in buildIntent() 251 } else if (jsonObject.has("data")) { in buildIntent() 252 intent.setData(Uri.parse(jsonObject.optString("data", null))); in buildIntent() 253 } else if (jsonObject.has("type")) { in buildIntent() 254 intent.setType(jsonObject.optString("type", null)); in buildIntent() [all …]
|
/external/json-schema-validator/src/test/java/com/networknt/schema/ |
D | Issue575Test.java | 81 void testValidTimeZoneOffsets(String jsonObject) throws JsonProcessingException { in testValidTimeZoneOffsets() argument 82 Set<ValidationMessage> errors = schema.validate(new ObjectMapper().readTree(jsonObject)); in testValidTimeZoneOffsets() 123 void testInvalidTimeRepresentations(String jsonObject) throws JsonProcessingException { in testInvalidTimeRepresentations() argument 124 …Set<ValidationMessage> errors = schema.validate(new ObjectMapper().readTree(jsonObject), OutputFor… in testInvalidTimeRepresentations()
|
D | CyclicDependencyTest.java | 16 String jsonObject = "{\n" + in whenDependencyBetweenSchemaThenValidationSuccessful() local 37 assertEquals(0, schema.validate(new ObjectMapper().readTree(jsonObject)).size()); in whenDependencyBetweenSchemaThenValidationSuccessful()
|
/external/gson/gson/src/test/java/com/google/gson/functional/ |
D | RuntimeTypeAdapterFactoryFunctionalTest.java | 190 JsonObject jsonObject = delegate.toJsonTree(value).getAsJsonObject(); in create() local 191 if (!jsonObject.has(typeFieldName)) { in create() 194 for (Map.Entry<String, JsonElement> e : jsonObject.entrySet()) { in create() 197 jsonObject = clone; in create() 199 Streams.write(jsonObject, out); in create()
|
/external/moshi/moshi/src/test/java/com/squareup/moshi/ |
D | MapJsonAdapterTest.java | 171 Map<String, Boolean> jsonObject = new LinkedHashMap<>(); in mapWithNonStringKeysToJsonObject() local 172 jsonObject.put("5", true); in mapWithNonStringKeysToJsonObject() 173 jsonObject.put("6", false); in mapWithNonStringKeysToJsonObject() 174 jsonObject.put("7", null); in mapWithNonStringKeysToJsonObject() 177 assertThat(jsonAdapter.serializeNulls().toJsonValue(map)).isEqualTo(jsonObject); in mapWithNonStringKeysToJsonObject() 178 assertThat(jsonAdapter.fromJsonValue(jsonObject)).isEqualTo(map); in mapWithNonStringKeysToJsonObject()
|
/external/mobly-snippet-lib/examples/ex6_complex_type_conversion/src/main/java/com/google/android/mobly/snippet/example6/ |
D | ExampleObjectConverter.java | 28 public Object deserialize(JSONObject jsonObject, Type type) throws JSONException { in deserialize() argument 30 return new CustomType(jsonObject.getString("Value")); in deserialize()
|
/external/gson/extras/src/main/java/com/google/gson/typeadapters/ |
D | RuntimeTypeAdapterFactory.java | 271 JsonObject jsonObject = delegate.toJsonTree(value).getAsJsonObject(); in create() local 274 jsonElementAdapter.write(out, jsonObject); in create() 280 if (jsonObject.has(typeFieldName)) { in create() 286 for (Map.Entry<String, JsonElement> e : jsonObject.entrySet()) { in create()
|
/external/grpc-grpc-java/authz/src/main/java/io/grpc/authz/ |
D | AuthorizationPolicyTranslator.java | 166 Object jsonObject = JsonParser.parse(authorizationPolicy); in translate() local 167 if (!(jsonObject instanceof Map)) { in translate() 170 + (jsonObject == null ? null : jsonObject.getClass())); in translate() 173 Map<String, ?> json = (Map<String, ?>)jsonObject; in translate()
|
/external/mobly-snippet-lib/third_party/sl4a/src/main/java/com/google/android/mobly/snippet/manager/ |
D | SnippetObjectConverterManager.java | 59 public Object jsonToObject(JSONObject jsonObject, Type type) throws JSONException { in jsonToObject() argument 63 return mConverter.deserialize(jsonObject, type); in jsonToObject()
|
/external/kotlinx.serialization/formats/json-tests/commonTest/src/kotlinx/serialization/ |
D | JsonElementPolymorphicErrorTest.kt | 40 return element.jsonObject.getValue("value") in <lambda>() 46 val value = element.jsonObject.getValue("value") in <lambda>()
|