MCPcopy Index your code
hub / github.com/google/gson / toString

Method toString

src/main/java/com/google/gson/JsonPrimitive.java:300–309  ·  view source on GitHub ↗
(Appendable sb, Escaper escaper)

Source from the content-addressed store, hash-verified

298 }
299
300 @Override
301 protected void toString(Appendable sb, Escaper escaper) throws IOException {
302 if (isString()) {
303 sb.append('"');
304 sb.append(escaper.escapeJsonString(value.toString()));
305 sb.append('"');
306 } else {
307 sb.append(value.toString());
308 }
309 }
310
311 private static boolean isPrimitiveOrString(Object target) {
312 if (target instanceof String) {

Callers 4

getAsStringMethod · 0.45
getAsBigDecimalMethod · 0.45
getAsBigIntegerMethod · 0.45

Calls 3

isStringMethod · 0.95
appendMethod · 0.80
escapeJsonStringMethod · 0.80

Tested by 1