kotlinx-serialization / kotlinx.serialization.json / JsonObject / getPrimitiveOrNull

getPrimitiveOrNull

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

Returns JsonPrimitive associated with given key or null if element is not present or has different type