ReadingDeserializer

A JVM-only Deserializer that can also read directly from a Reader (e.g. a file or network stream), avoiding the need to first buffer the whole input into a String. The String-based deserialize/deserializeMany methods of Deserializer are implemented in terms of the Reader-based ones, by wrapping the string in a StringReader.

Type Parameters

T

the type of values this deserializer can produce.

Inheritors

Properties

Link copied to clipboard
abstract val mimeType: MimeType

The textual format this deserializer consumes.

Functions

Link copied to clipboard
abstract fun deserialize(reader: Reader): T

Deserializes a single value of type T by reading its textual representation from reader.

open override fun deserialize(string: String): T

Deserializes a single value of type T from its textual representation string.

Link copied to clipboard
abstract fun deserializeMany(reader: Reader): Iterable<T>

Deserializes several values of type T by reading their textual representation from reader.

open override fun deserializeMany(string: String): Iterable<T>

Deserializes several values of type T from a single textual representation string of all of them.