default

Default value for this property.

Accepts Map<*, *>, JsonElement, or null. Map keys are converted to strings and values are converted as follows:

  • String → JsonPrimitive

  • Number → JsonPrimitive

  • Boolean → JsonPrimitive

  • null → JsonNull

  • JsonElement → used as-is

Throws IllegalStateException for unsupported value types or non-Map values.

Example

obj {
default = mapOf("key" to "value", "count" to 42)
}