NovaRegistryEntrySetSerializer

open class NovaRegistryEntrySetSerializer<T : NovaRegistryElement<T>>(val registry: NovaRegistry<T>) : JsonTransformingSerializer<RegistryEntrySet.Nova<T>>

Open base class for specialized RegistryEntrySet.Nova serializers. Serializes RegistryEntrySet.Nova.Tag to #namespace:value and RegistryEntrySet.Nova.Direct to ["namespace:value1", "namespace:value2"] (or just "namespace:value" if there's only one entry).

This is a JsonTransformingSerializer as it needs to support both arrays and primitive values, so it can only be used for JSON.

Constructors

Link copied to clipboard
constructor(registry: NovaRegistry<T>)

Properties

Link copied to clipboard
open override val descriptor: SerialDescriptor
Link copied to clipboard

The registry this serializer is for.

Functions

Link copied to clipboard
override fun deserialize(decoder: Decoder): RegistryEntrySet.Nova<T>
Link copied to clipboard
override fun serialize(encoder: Encoder, value: RegistryEntrySet.Nova<T>)