toJson

fun Node.toJson(pretty: Boolean = false): String

Serializes this Node to spec JSON.

Return

the JSON string.

Parameters

pretty

when true, pretty-prints with two-space indents; otherwise emits the compact form. Defaults to false.


fun Spec.toJson(pretty: Boolean = false): String

Serializes this Spec to spec JSON.

Return

the JSON string.

Parameters

pretty

when true, pretty-prints with two-space indents; otherwise emits the compact form. Defaults to false.