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

Method nullValue

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

Encodes {@code null}. @return this writer.

()

Source from the content-addressed store, hash-verified

664 * @return this writer.
665 */
666 @CanIgnoreReturnValue
667 public JsonWriter nullValue() throws IOException {
668 if (deferredName != null) {
669 if (serializeNulls) {
670 writeDeferredName();
671 } else {
672 deferredName = null;
673 return this; // skip the name and the value
674 }
675 }
676 beforeValue();
677 out.write("null");
678 return this;
679 }
680
681 /**
682 * Writes {@code value} directly to the writer without quoting or escaping. This might not be

Callers 14

testNullsMethod · 0.95
testPrettyPrintArrayMethod · 0.95
valueMethod · 0.95
jsonValueMethod · 0.95
writeMethod · 0.45
writeMapFieldMethod · 0.45
writeOneofFieldsMethod · 0.45
testPrettyPrintObjectMethod · 0.45

Calls 3

writeDeferredNameMethod · 0.95
beforeValueMethod · 0.95
writeMethod · 0.45

Tested by 7

testNullsMethod · 0.76
testPrettyPrintArrayMethod · 0.76
testPrettyPrintObjectMethod · 0.36