toJson

fun toJson(indent: <Error class: unknown class>): String

Create a JSON string of @value serialization. If @indent is 0, the resulting JSON will not contain newlines. The size of the indent is clamped to 10 spaces.

Return

a null-terminated JSON string with serialization of @value

Since

2.28

Parameters

indent

The number of spaces to indent when nesting.