extract

abstract fun extract(roots: Iterable<SerialDescriptor>, module: SerializersModule = EmptySerializersModule(), config: SnapshotConfig = SnapshotConfig()): Snapshot

Walks the roots descriptor graphs into a Snapshot.

Parameters

roots

the in-scope @Serializable types' descriptors.

module

resolves open-polymorphic subtypes (from the user's Json).

config

the wire config recorded on the resulting snapshot; also supplies the default polymorphic discriminator key.