Dump

class Dump @JvmOverloads constructor(settings: DumpSettings, representer: Representer = Representer(settings))

Common way to serialize any Java instance(s). The instance is stateful. Only one of the 'dump' methods may be called, and it may be called only once.

Parameters

settings
  • Configuration options

representer
  • The component to translate Java instances to Nodes

Constructors

Link copied to clipboard
constructor(settings: DumpSettings, representer: Representer = Representer(settings))

Functions

Link copied to clipboard
fun dump(yaml: Any?, streamDataWriter: StreamDataWriter)

Dump a single instance into a YAML document

Link copied to clipboard
fun dumpAll(instancesIterator: Iterator<Any?>, streamDataWriter: StreamDataWriter)

Dump all the instances from the iterator into a stream with every instance in a separate YAML document

Link copied to clipboard
fun dumpAllToString(instancesIterator: Iterator<Any?>): String

Dump all the instances from the iterator into a stream with every instance in a separate YAML document

Link copied to clipboard
fun dumpNode(node: Node, streamDataWriter: StreamDataWriter)

Dump the provided Node into a YAML stream.

Link copied to clipboard
fun dumpToString(yaml: Any?): String

Dump all the instances from the iterator into a stream with every instance in a separate YAML document