DerConfiguration
Properties
if true, default-valued properties are encoded. If false, default-valued properties are omitted.
if true, nullable properties are encoded as ASN.1 NULL by default. If false, nullable null values are omitted by default. exactly as originally decoded.
maximum allowed total number of encoded DER bytes to consume before refusing to parse and throwing. This limit is enforced before reading or peeking from the underlying source. Defaults to Int.MAX_VALUE so that all element lengths produced under the default fit in Int and parsing / re-encoding stay fully Int-based; raise it only if you deliberately handle multi-gigabyte input (which also requires a Source, since a ByteArray cannot exceed Int.MAX_VALUE bytes anyway).
maximum structural nesting depth the typed encoder/decoder will descend before throwing a kotlinx.serialization.SerializationException. The raw parser/encoder are iterative and stack-safe, but kotlinx.serialization's encode/decode contract is recursive descent (deserialize ->decodeSerializableElement ->deserialize -> ...; and the mirror on encode), so a self-referential @Serializable type that is deeply nested (decoded from deeply nested input, or serialized from a deeply nested in-memory value) would otherwise overflow the call stack with an unrecoverable StackOverflowError. This guard converts that into a clean, catchable exception. The default (128) is far above any realistic ASN.1/PKI structure (typically < ~40 levels) and below the depth at which the JVM call stack overflows. Lower it on very small thread stacks; raise it only if you knowingly process deeply nested recursive models.
serializers used for contextual/open-polymorphic resolution.