decodeStructure

inline fun <T> Decoder.decodeStructure(descriptor: SerialDescriptor, crossinline block: CompositeDecoder.() -> T): T

Begins a structure, decodes it using the given block, ends it and returns decoded element.