MCPcopy
hub / github.com/google/gson / value

Method value

gson/src/main/java/com/google/gson/stream/JsonWriter.java:526–535  ·  view source on GitHub ↗

Encodes {@code value}. @param value the literal string value, or null to encode a null literal. @return this writer.

(String value)

Source from the content-addressed store, hash-verified

524 * @return this writer.
525 */
526 @CanIgnoreReturnValue
527 public JsonWriter value(String value) throws IOException {
528 if (value == null) {
529 return nullValue();
530 }
531 writeDeferredName();
532 beforeValue();
533 string(value);
534 return this;
535 }
536
537 /**
538 * Encodes {@code value}.

Callers 15

testDefaultStrictnessMethod · 0.95
testSetLenientTrueMethod · 0.95
testSetLenientFalseMethod · 0.95
testSetStrictnessMethod · 0.95
testSetStrictnessNullMethod · 0.95
testNameInArrayMethod · 0.95
testValueWithoutNameMethod · 0.95
testNullStringValueMethod · 0.95

Calls 10

nullValueMethod · 0.95
writeDeferredNameMethod · 0.95
beforeValueMethod · 0.95
stringMethod · 0.95
matchesMethod · 0.80
toStringMethod · 0.65
writeMethod · 0.45
appendMethod · 0.45
equalsMethod · 0.45

Tested by 15

testDefaultStrictnessMethod · 0.76
testSetLenientTrueMethod · 0.76
testSetLenientFalseMethod · 0.76
testSetStrictnessMethod · 0.76
testSetStrictnessNullMethod · 0.76
testNameInArrayMethod · 0.76
testValueWithoutNameMethod · 0.76
testNullStringValueMethod · 0.76