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

Method asString

java/src/org/openqa/selenium/json/JsonOutput.java:447–465  ·  view source on GitHub ↗

Return a quoted JSON string representing the specified Java object. @param obj Java object to be represented @return quoted JSON string

(Object obj)

Source from the content-addressed store, hash-verified

445 * @return quoted JSON string
446 */
447 private String asString(Object obj) {
448 StringBuilder toReturn = new StringBuilder("\"");
449
450 String.valueOf(obj)
451 .chars()
452 .forEach(
453 i -> {
454 String escaped = ESCAPES.get(i);
455 if (escaped != null) {
456 toReturn.append(escaped);
457 } else {
458 toReturn.append((char) i);
459 }
460 });
461
462 toReturn.append('"');
463
464 return toReturn.toString();
465 }
466
467 /**
468 * Get a reference to a method of the specified name with no argument in the indicated class or

Callers 15

JsonOutputMethod · 0.95
OnScriptWaitMethod · 0.80
ExecuteAsyncMethod · 0.80
AddArgumentMethod · 0.80
GetElementIdListMethod · 0.80
WaitForPollingScriptMethod · 0.80
PerformInputSequenceMethod · 0.80
GetTicksMethod · 0.80
PointerMoveToMethod · 0.80
KeyDownMethod · 0.80
KeyUpMethod · 0.80
FromJsonMethod · 0.80

Calls 4

getMethod · 0.65
toStringMethod · 0.65
forEachMethod · 0.45
appendMethod · 0.45