NbtBuilder

Builder of the Nbt instance provided by Nbt { ... } factory function.

Properties

Link copied to clipboard
open override var classDiscriminator: String

Name of the class descriptor property for polymorphic serialization. "type" by default.

Link copied to clipboard

The compression method to use when writing NBT binary. Required.

Link copied to clipboard

The compression level, in 0..9 or null. null by default.

Link copied to clipboard
open override var encodeDefaults: Boolean

Specifies whether default values of Kotlin properties should be encoded. false by default.

Link copied to clipboard
open override var ignoreUnknownKeys: Boolean

Specifies whether encounters of unknown properties in the input NBT should be ignored instead of throwing SerializationException. false by default.

Link copied to clipboard
open override var nameRootClasses: Boolean

Specifies whether classes serialized as the root NBT tag should be named with their SerialDescriptor.serialName. true by default.

Link copied to clipboard
open override var serializersModule: SerializersModule

Module with contextual and polymorphic serializers to be used in the resulting Nbt instance.

Link copied to clipboard

The variant of NBT binary format to use. Required.