json Object
fun jsonObject(initialFields: Map<String, JsonValue> = emptyMap(), builder: JsonObjectBuilder.() -> Unit): JsonObject
Creates a new JsonObject using the provided initial fields and a lambda for adding or modifying fields. This function is part of a DSL for building JSON objects in a structured and type-safe way.
Return
A new JsonObject containing the specified fields and modifications.
Parameters
initial Fields
The initial fields to populate the JSON object with. Defaults to an empty map.
builder
A lambda that defines additional fields or modifications to construct the JSON object.