AnyValue

@Serializable(with = AnyValueSerializer::class)
class AnyValue(source)

The value of a Data Connect Any scalar: a String, a Boolean, a Double, a List of such values (or null) or a Map from String to such values (or null). A null scalar is represented by null rather than by an AnyValue.

The Android SDK keeps the value as a protobuf Value; this class keeps the plain Kotlin value, which is what value returns on both. Numbers other than Double given to fromAny are converted to Double, as the wire format has only that number type.

Constructors

Link copied to clipboard
constructor(value: Map<String, Any?>)
constructor(value: List<Any?>)
constructor(value: String)
constructor(value: Boolean)
constructor(value: Double)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val value: Any

Functions

Link copied to clipboard
inline fun <T> AnyValue.decode(): T

Decodes this value with the serializer of T.

fun <T> AnyValue.decode(deserializer: DeserializationStrategy<T>, serializersModule: SerializersModule? = null): T

Decodes this value with deserializer.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String