Load

expect class Load constructor(settings: LoadSettings = LoadSettings.builder().build(), constructor: BaseConstructor = StandardConstructor(settings))(source)

Common way to load object instance(s).

This class is not thread-safe. Which means that all the methods of the same instance can be called only by one thread. It is better to create an instance for every YAML stream. The instance is stateful. Only one of the 'load' methods may be called, and it may be called only once.

Parameters

settings

configuration

constructor

custom YAML constructor

actual class Load constructor(settings: LoadSettings, constructor: BaseConstructor)(source)
actual class Load @JvmOverloads constructor(settings: LoadSettings, constructor: BaseConstructor)(source)

Common way to load object instance(s).

This class is not thread-safe. Which means that all the methods of the same instance can be called only by one thread. It is better to create an instance for every YAML stream. The instance is stateful. Only one of the 'load' methods may be called, and it may be called only once.

Parameters

settings

configuration

constructor

custom YAML constructor

actual class Load constructor(settings: LoadSettings, constructor: BaseConstructor)(source)

Constructors

Link copied to clipboard
expect constructor(settings: LoadSettings = LoadSettings.builder().build(), constructor: BaseConstructor = StandardConstructor(settings))
actual constructor(settings: LoadSettings, constructor: BaseConstructor)
actual constructor(settings: LoadSettings, constructor: BaseConstructor)
actual constructor(settings: LoadSettings, constructor: BaseConstructor)

Functions

Link copied to clipboard
expect fun loadAll(string: String): Iterable<Any?>

Parse all YAML documents in a String and produce corresponding objects. The documents are parsed only when the iterator is invoked.

actual fun loadAll(string: String): Iterable<Any?>
fun loadAll(inputStream: InputStream): Iterable<Any?>

Parse all YAML documents in a stream and produce corresponding objects. The documents are parsed only when the iterator is invoked.

fun loadAll(reader: Reader): Iterable<Any?>

Parse all YAML documents in a String and produce corresponding objects. The documents are parsed only when the iterator is invoked.

actual fun loadAll(string: String): Iterable<Any?>
actual fun loadAll(string: String): Iterable<Any?>
Link copied to clipboard
Link copied to clipboard
fun loadAllFromReader(yamlReader: Reader): Iterable<Any?>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun loadFromReader(yamlReader: Reader): Any?
Link copied to clipboard
Link copied to clipboard
expect fun loadOne(string: String): Any?

Parse a YAML document and create an instance of an object.

actual fun loadOne(string: String): Any?
fun loadOne(inputStream: InputStream): Any?

Parse the only YAML document in a stream and produce the corresponding object.

fun loadOne(reader: Reader): Any?

Parse a YAML document and create a object instance.

actual fun loadOne(string: String): Any?
actual fun loadOne(string: String): Any?