decode

inline fun <T> FormParameters.decode(): T(source)

Deserializes FormParameters into T.

Values are interpreted by the shape of T: members declared as strings keep their value verbatim, all others are read as JSON, so that objects, arrays, numbers and booleans survive the round-trip through encodeToParameters. For polymorphic types, select a concrete deserializer first so its descriptor describes the form fields.

Throws

SerializationException

if the parameters do not describe a valid T


fun <T> FormParameters.decode(deserializer: DeserializationStrategy<T>): T(source)

Variant of decode taking an explicit deserializer, for use without reified type information.