kotlinx-serialization / kotlinx.serialization.json / JsonObject / getPrimitive

getPrimitive

(common, js, jvm, native) fun getPrimitive(key: String): JsonPrimitive

Returns JsonPrimitive associated with given key

Exceptions

NoSuchElementException - if element is not present

JsonException - if element is present, but has invalid type