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

Method value

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

Encodes 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

321 * @return this writer.
322 */
323 public JsonWriter value(String value) throws IOException {
324 if (value == null) {
325 return nullValue();
326 }
327 beforeValue(false);
328 string(value);
329 return this;
330 }
331
332 /**
333 * Encodes {@code null}.

Callers 15

testWrongTopLevelTypeMethod · 0.95
testValueWithoutNameMethod · 0.95
testNullStringValueMethod · 0.95
testNonFiniteDoublesMethod · 0.95
testDoublesMethod · 0.95
testLongsMethod · 0.95
testNumbersMethod · 0.95
testBooleansMethod · 0.95
testStringsMethod · 0.95
testArraysInObjectsMethod · 0.95
testPrettyPrintObjectMethod · 0.95

Calls 7

nullValueMethod · 0.95
beforeValueMethod · 0.95
stringMethod · 0.95
appendMethod · 0.80
writeMethod · 0.45
toStringMethod · 0.45
equalsMethod · 0.45

Tested by 15

testWrongTopLevelTypeMethod · 0.76
testValueWithoutNameMethod · 0.76
testNullStringValueMethod · 0.76
testNonFiniteDoublesMethod · 0.76
testDoublesMethod · 0.76
testLongsMethod · 0.76
testNumbersMethod · 0.76
testBooleansMethod · 0.76
testStringsMethod · 0.76
testArraysInObjectsMethod · 0.76
testPrettyPrintObjectMethod · 0.76