MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / convert

Method convert

java/src/org/openqa/selenium/json/Json.java:275–280  ·  view source on GitHub ↗

Deserialize an already-parsed JSON value into an object of the specified type. The source is the java.util.Map/java.util.List/String/Number/Boolean/null structure that #toType(String, Type) returns for #MAP_TYPE or #OBJECT_TYPE

(@Nullable Object source, Type typeOfT)

Source from the content-addressed store, hash-verified

273 * deeper than {@link JsonOutput#MAX_DEPTH}
274 */
275 public <T> @Nullable T convert(@Nullable Object source, Type typeOfT) {
276 if (source == null) {
277 return null;
278 }
279 return toType(toJson(source), typeOfT);
280 }
281
282 /**
283 * Create a new {@code JsonInput} object to traverse the JSON string supplied the specified {@code

Callers 6

mapMethod · 0.45
fromMapMethod · 0.45
CommandMethod · 0.45
ScriptClass · 0.45
createEvaluateResultMethod · 0.45
BrowsingContextClass · 0.45

Calls 2

toTypeMethod · 0.95
toJsonMethod · 0.95

Tested by

no test coverage detected