In the types-kotlinx-serialization subproject, we want to introduce the ZeroAsByteSerializerexperimental 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.zeroexperimental property with an error level for using this new serializer instead.
✅ Checklist
[x] ✨ Add the type and its public constructor with tests, documentation and samples.
[x] ✨ Override the toString method with tests, documentation and samples.
[x] ✨ Override the equals method with tests, documentation and samples.
[x] ✨ Override the hashCode method with tests, documentation and samples.
[x] ✨ Make the type implementing the KSerializer<Zero> type with tests, documentation and samples.
[x] 🗑️ Deprecate the KotoolsTypesSerializers.zero property.
[x] 📝 Update the unreleased changelog for this issue.
[x] 📝 Create another issue for removing the KotoolsTypesSerializers.zerodeprecated property for the next iteration.
📝 Description
In the
types-kotlinx-serialization
subproject, we want to introduce theZeroAsByteSerializer
experimental type for serializing theZero
type asByte
. This serializer should be available for all Kotlin platforms.Finally, we want to deprecate the
KotoolsTypesSerializers.zero
experimental property with an error level for using this new serializer instead.✅ Checklist
toString
method with tests, documentation and samples.equals
method with tests, documentation and samples.hashCode
method with tests, documentation and samples.KSerializer<Zero>
type with tests, documentation and samples.KotoolsTypesSerializers.zero
property.KotoolsTypesSerializers.zero
deprecated property for the next iteration.