kotlinx-serialization / kotlinx.serialization.json / JsonElement / primitive

primitive

(common, js, jvm, native) open val primitive: JsonPrimitive

Convenience method to get current element as JsonPrimitive

Exceptions

JsonException - if current element is not a JsonPrimitive