Package blue.starry.jsonkt

Types

InvalidJsonModelException
Link copied to clipboard
common
class InvalidJsonModelException(modelClass: KClass<*>) : JsonKtException
JsonArray
Link copied to clipboard
common
typealias JsonArray = kotlinx.serialization.json.JsonArray
JsonCastException
Link copied to clipboard
common
class JsonCastException(element: Any, type: KClass<*>) : JsonKtException
JsonConversionException
Link copied to clipboard
common
class JsonConversionException(type: KClass<*>) : JsonKtException
JsonElement
Link copied to clipboard
common
typealias JsonElement = kotlinx.serialization.json.JsonElement
JsonKt
Link copied to clipboard
common
object JsonKt
JsonKtException
Link copied to clipboard
common
open class JsonKtException(message: String) : Exception
JsonNull
Link copied to clipboard
common
typealias JsonNull = kotlinx.serialization.json.JsonNull
JsonNullPointerException
Link copied to clipboard
common
class JsonNullPointerException(key: String, json: JsonObject?) : JsonKtException
JsonObject
Link copied to clipboard
common
typealias JsonObject = kotlinx.serialization.json.JsonObject
JsonPrimitive
Link copied to clipboard
common
typealias JsonPrimitive = kotlinx.serialization.json.JsonPrimitive

Functions

asJsonElement
Link copied to clipboard
common
fun <T : Any> T?.asJsonElement(): JsonElement
cast
Link copied to clipboard
common
inline fun <T : Any> JsonElement.cast(): T
inline fun <T> JsonPrimitive.cast(): T
copy
Link copied to clipboard
common
inline fun JsonArray.copy(block: (JsonMutableArray) -> Unit): JsonArray
inline fun JsonObject.copy(block: (JsonMutableMap) -> Unit): JsonObject
copyAsArray
Link copied to clipboard
common
fun JsonElement.copyAsArray(block: (JsonMutableArray) -> Unit): JsonArray
copyAsObject
Link copied to clipboard
common
fun JsonElement.copyAsObject(block: (JsonMutableMap) -> Unit): JsonObject
encodeToString
Link copied to clipboard
common
fun JsonModel.encodeToString(): String
fun JsonModel.encodeToString(customizedJson: Json): String
fun JsonPairArray.encodeToString(customizedJson: Json = Json): String
fun JsonPairIterable.encodeToString(customizedJson: Json = Json): String
fun JsonPairSequence.encodeToString(customizedJson: Json = Json): String
fun JsonElement.encodeToString(customizedJson: Json = Json): String
get
Link copied to clipboard
common
operator fun JsonElement.get(index: Int): JsonElement
operator fun JsonElement.get(key: String): JsonElement
isNull
Link copied to clipboard
common
fun JsonElement?.isNull(): Boolean
jsonArrayOf
Link copied to clipboard
common
fun jsonArrayOf(vararg elements: JsonValue): JsonArray
jsonObjectOf
Link copied to clipboard
common
fun jsonObjectOf(vararg pairs: JsonPair): JsonObject
parseArray
Link copied to clipboard
inline fun <T : JsonModel> JsonValueArray.parseArray(): List<T>
inline fun <T : JsonModel> String.parseArray(): List<T>
inline fun <T : JsonModel> JsonValueIterable.parseArray(): List<T>
inline fun <T : JsonModel> JsonValueSequence.parseArray(): List<T>
inline fun <T : JsonModel> JsonArray.parseArray(): List<T>
inline fun <T : JsonModel> JsonElement.parseArray(): List<T>
fun <T : JsonModel> JsonElement.parseArray(model: KClass<T>): List<T>
fun <T : JsonModel> JsonValueArray.parseArray(block: (JsonObject) -> T): List<T>
fun <T : JsonModel> String.parseArray(block: (JsonObject) -> T): List<T>
fun <T : JsonModel> JsonValueIterable.parseArray(block: (JsonObject) -> T): List<T>
fun <T : JsonModel> JsonValueSequence.parseArray(block: (JsonObject) -> T): List<T>
fun <T : JsonModel> JsonArray.parseArray(block: (JsonObject) -> T): List<T>
fun <T : JsonModel> JsonElement.parseArray(block: (JsonObject) -> T): List<T>
parseArrayOrNull
Link copied to clipboard
inline fun <T : JsonModel> JsonValueArray?.parseArrayOrNull(): List<T>?
inline fun <T : JsonModel> String?.parseArrayOrNull(): List<T>?
inline fun <T : JsonModel> JsonValueIterable?.parseArrayOrNull(): List<T>?
inline fun <T : JsonModel> JsonValueSequence?.parseArrayOrNull(): List<T>?
inline fun <T : JsonModel> JsonArray?.parseArrayOrNull(): List<T>?
inline fun <T : JsonModel> JsonElement?.parseArrayOrNull(): List<T>?
fun <T : JsonModel> JsonElement?.parseArrayOrNull(model: KClass<T>): List<T>?
fun <T : JsonModel> JsonValueArray?.parseArrayOrNull(block: (JsonObject) -> T): List<T>?
fun <T : JsonModel> String?.parseArrayOrNull(block: (JsonObject) -> T): List<T>?
fun <T : JsonModel> JsonValueIterable?.parseArrayOrNull(block: (JsonObject) -> T): List<T>?
fun <T : JsonModel> JsonValueSequence?.parseArrayOrNull(block: (JsonObject) -> T): List<T>?
fun <T : JsonModel> JsonArray?.parseArrayOrNull(block: (JsonObject) -> T): List<T>?
fun <T : JsonModel> JsonElement?.parseArrayOrNull(block: (JsonObject) -> T): List<T>?
parseObject
Link copied to clipboard
inline fun <T : JsonModel> JsonPairArray.parseObject(): T
inline fun <T : JsonModel> String.parseObject(): T
inline fun <T : JsonModel> JsonPairIterable.parseObject(): T
inline fun <T : JsonModel> JsonMap.parseObject(): T
inline fun <T : JsonModel> JsonPairSequence.parseObject(): T
inline fun <T : JsonModel> JsonElement.parseObject(): T
inline fun <T : JsonModel> JsonObject.parseObject(): T
fun <T : JsonModel> JsonElement.parseObject(model: KClass<T>): T
fun <T : JsonModel> JsonPairArray.parseObject(block: (JsonObject) -> T): T
fun <T : JsonModel> String.parseObject(block: (JsonObject) -> T): T
fun <T : JsonModel> JsonPairIterable.parseObject(block: (JsonObject) -> T): T
fun <T : JsonModel> JsonMap.parseObject(block: (JsonObject) -> T): T
fun <T : JsonModel> JsonPairSequence.parseObject(block: (JsonObject) -> T): T
fun <T : JsonModel> JsonElement.parseObject(block: (JsonObject) -> T): T
fun <T : JsonModel> JsonObject.parseObject(block: (JsonObject) -> T): T
parseObjectOrNull
Link copied to clipboard
inline fun <T : JsonModel> JsonPairArray?.parseObjectOrNull(): T?
inline fun <T : JsonModel> String?.parseObjectOrNull(): T?
inline fun <T : JsonModel> JsonPairIterable?.parseObjectOrNull(): T?
inline fun <T : JsonModel> JsonMap?.parseObjectOrNull(): T?
inline fun <T : JsonModel> JsonPairSequence?.parseObjectOrNull(): T?
inline fun <T : JsonModel> JsonElement?.parseObjectOrNull(): T?
inline fun <T : JsonModel> JsonObject?.parseObjectOrNull(): T?
fun <T : JsonModel> JsonElement?.parseObjectOrNull(model: KClass<T>): T?
fun <T : JsonModel> JsonPairArray?.parseObjectOrNull(block: (JsonObject) -> T): T?
fun <T : JsonModel> String?.parseObjectOrNull(block: (JsonObject) -> T): T?
fun <T : JsonModel> JsonPairIterable?.parseObjectOrNull(block: (JsonObject) -> T): T?
fun <T : JsonModel> JsonMap?.parseObjectOrNull(block: (JsonObject) -> T): T?
fun <T : JsonModel> JsonPairSequence?.parseObjectOrNull(block: (JsonObject) -> T): T?
fun <T : JsonModel> JsonElement?.parseObjectOrNull(block: (JsonObject) -> T): T?
fun <T : JsonModel> JsonObject?.parseObjectOrNull(block: (JsonObject) -> T): T?
safeCast
Link copied to clipboard
common
inline fun <T> JsonPrimitive.safeCast(): T?
toJsonArray
Link copied to clipboard
common
fun JsonValueArray.toJsonArray(): JsonArray
fun String.toJsonArray(): JsonArray
fun JsonValueIterable.toJsonArray(): JsonArray
fun JsonValueSequence.toJsonArray(): JsonArray
toJsonArrayOrNull
Link copied to clipboard
common
fun JsonValueArray?.toJsonArrayOrNull(): JsonArray?
fun String?.toJsonArrayOrNull(): JsonArray?
fun JsonValueIterable?.toJsonArrayOrNull(): JsonArray?
fun JsonValueSequence?.toJsonArrayOrNull(): JsonArray?
toJsonElement
Link copied to clipboard
common
fun String.toJsonElement(): JsonElement
toJsonElementOrNull
Link copied to clipboard
common
fun String?.toJsonElementOrNull(): JsonElement?
toJsonObject
Link copied to clipboard
common
fun JsonPairArray.toJsonObject(): JsonObject
fun String.toJsonObject(): JsonObject
fun JsonPairIterable.toJsonObject(): JsonObject
fun JsonMap.toJsonObject(): JsonObject
fun JsonPairSequence.toJsonObject(): JsonObject
toJsonObjectOrNull
Link copied to clipboard
common
fun JsonPairArray?.toJsonObjectOrNull(): JsonObject?
fun String?.toJsonObjectOrNull(): JsonObject?
fun JsonPairIterable?.toJsonObjectOrNull(): JsonObject?
fun JsonMap?.toJsonObjectOrNull(): JsonObject?
fun JsonPairSequence?.toJsonObjectOrNull(): JsonObject?
toJsonPrimitive
Link copied to clipboard
common
fun String.toJsonPrimitive(): JsonPrimitive
toJsonPrimitiveOrNull
Link copied to clipboard
common
fun String?.toJsonPrimitiveOrNull(): JsonPrimitive?

Properties

booleanList
Link copied to clipboard
common
val JsonArray.booleanList: List<Boolean>
char
Link copied to clipboard
common
val JsonElement.char: Char
charList
Link copied to clipboard
common
val JsonArray.charList: List<Char>
charOrNull
Link copied to clipboard
common
val JsonElement.charOrNull: Char?
doubleList
Link copied to clipboard
common
val JsonArray.doubleList: List<Double>
floatList
Link copied to clipboard
common
val JsonArray.floatList: List<Float>
intList
Link copied to clipboard
common
val JsonArray.intList: List<Int>
isBoolean
Link copied to clipboard
common
val JsonPrimitive.isBoolean: Boolean
isDouble
Link copied to clipboard
common
val JsonPrimitive.isDouble: Boolean
isFloat
Link copied to clipboard
common
val JsonPrimitive.isFloat: Boolean
isInt
Link copied to clipboard
common
val JsonPrimitive.isInt: Boolean
isLong
Link copied to clipboard
common
val JsonPrimitive.isLong: Boolean
jsonArrayList
Link copied to clipboard
common
val JsonArray.jsonArrayList: List<JsonArray>
jsonArrayOrNull
Link copied to clipboard
common
val JsonElement.jsonArrayOrNull: JsonArray?
jsonObjectList
Link copied to clipboard
common
val JsonArray.jsonObjectList: List<JsonObject>
jsonObjectOrNull
Link copied to clipboard
common
val JsonElement.jsonObjectOrNull: JsonObject?
jsonPrimitiveList
Link copied to clipboard
common
val JsonArray.jsonPrimitiveList: List<JsonPrimitive>
longList
Link copied to clipboard
common
val JsonArray.longList: List<Long>
nullableBooleanList
Link copied to clipboard
common
val JsonArray.nullableBooleanList: List<Boolean?>
nullableCharList
Link copied to clipboard
common
val JsonArray.nullableCharList: List<Char?>
nullableDoubleList
Link copied to clipboard
common
val JsonArray.nullableDoubleList: List<Double?>
nullableFloatList
Link copied to clipboard
common
val JsonArray.nullableFloatList: List<Float?>
nullableIntList
Link copied to clipboard
common
val JsonArray.nullableIntList: List<Int?>
nullableJsonArrayList
Link copied to clipboard
common
val JsonArray.nullableJsonArrayList: List<JsonArray?>
nullableJsonObjectList
Link copied to clipboard
common
val JsonArray.nullableJsonObjectList: List<JsonObject?>
nullableJsonPrimitiveList
Link copied to clipboard
common
val JsonArray.nullableJsonPrimitiveList: List<JsonPrimitive?>
nullableLongList
Link copied to clipboard
common
val JsonArray.nullableLongList: List<Long?>
nullableStringList
Link copied to clipboard
common
val JsonArray.nullableStringList: List<String?>
primitiveOrNull
Link copied to clipboard
common
val JsonElement.primitiveOrNull: JsonPrimitive?
string
Link copied to clipboard
common
val JsonElement.string: String
stringList
Link copied to clipboard
common
val JsonArray.stringList: List<String>
stringOrNull
Link copied to clipboard
common
val JsonElement.stringOrNull: String?