value

Encodes {@code value} .

Return

this writer.

Parameters

value

the literal string value, or null to encode a null literal.

abstract fun value(value: String): JsonWriter

Encodes {@code value} .

Return

this writer.

abstract fun value(value: Boolean): JsonWriter
abstract fun value(value: Boolean): JsonWriter
abstract fun value(value: Long): JsonWriter

Encodes {@code value} .

Return

this writer.

Parameters

value

a finite value. May not be NaNs or .

abstract fun value(value: Double): JsonWriter

Encodes {@code value} .

Return

this writer.

Parameters

value

a finite value. May not be NaNs or .

abstract fun value(value: Number): JsonWriter

Writes {@code source} directly without encoding its contents. Equivalent to {@code try * (BufferedSink sink = writer.valueSink()) { source.readAll(sink): }}

See also

#valueSink()
Link copied to clipboard
fun value(source: BufferedSource): JsonWriter