buildJsonArray

inline fun buildJsonArray(builderAction: JsonArrayBuilder.() -> Unit): JsonArray(source)

Builds JsonArray with the given builderAction builder. Example of usage:

val json = buildJsonArray {
add(true)
addJsonArray {
for (i in 1..10) add(i)
}
addJsonObject {
put("stringKey", "stringValue")
}
}