Companion

Functions

Link copied to clipboard
inline fun <T> AnyValue.Companion.encode(value: T): AnyValue

Encodes value with the serializer of T.

fun <T> AnyValue.Companion.encode(value: T, serializer: SerializationStrategy<T>, serializersModule: SerializersModule? = null): AnyValue

Encodes value with serializer; a null result is an error, as AnyValue never holds null.

Link copied to clipboard

Wraps a plain value; throws IllegalArgumentException for a type that an Any scalar cannot hold.

@JvmName(name = "fromNullableAny")
fun AnyValue.Companion.fromAny(value: Any?): AnyValue?

fromAny for a nullable value: null for null.