โจ New `ZeroAsByteSerializer` type
LVMVRQUXL opened this issue ยท 0 comments
LVMVRQUXL commented
๐ Description
In the types-kotlinx-serialization
subproject, we want to introduce the ZeroAsByteSerializer
experimental type for serializing the Zero
type as Byte
. This serializer should be available for all Kotlin platforms.
class ZeroAsByteSerializer : KSerializer<Zero> {
override val descriptor: SerializerDescriptor
override fun equals(other: Any?): Boolean
override fun hashCode(): Int
override fun serialize(encoder: Encoder, value: Zero)
override fun deserialize(decoder: Decoder): Zero
override fun toString(): String
}
Finally, we want to deprecate the KotoolsTypesSerializers.zero
experimental property with an error level for using this new serializer instead.
โ Checklist
- โจ Add the type and its public constructor with tests, documentation and samples.
- โจ Override the
toString
method with tests, documentation and samples. - โจ Override the
equals
method with tests, documentation and samples. - โจ Override the
hashCode
method with tests, documentation and samples. - โจ Make the type implementing the
KSerializer<Zero>
type with tests, documentation and samples. - ๐๏ธ Deprecate the
KotoolsTypesSerializers.zero
property. - ๐ Update the unreleased changelog for this issue.
- ๐ Create another issue for removing the
KotoolsTypesSerializers.zero
deprecated property for the next iteration.