+ +
+

toYamlObject

+
+
inline fun Sequence<Pair<String, Any?>>.toYamlObject(): ObjectNode
inline fun Iterable<Pair<String, Any?>>.toYamlObject(): ObjectNode

Creates a new ObjectNode containing elements for each of the key/value Pair instances in the receiver stream.

Simple Example

listOf("a" to 1, "b" to 2, "c" to 3).toJsonObject() // {"a": 1, "b": 2, "c": 3}

In the event of conflicting keys, previously set values will be overwritten by values appearing later.

Return

A new ObjectNode containing elements for each of the key/value Pair instances in the receiver stream.

Since

v3.3.0


inline fun Map<String, Any?>.toYamlObject(): ObjectNode

Creates a new ObjectNode containing elements from the receiver map.

Simple Example

mapOf("a" to 1, "b" to 2, "c" to 3).toJsonObject() // {"a": 1, "b": 2, "c": 3}

Return

A new ObjectNode containing elements from the receiver stream.

Since

v3.3.0

+