Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ New ZeroAsLongSerializer type #696

Open
5 tasks
LVMVRQUXL opened this issue Jul 22, 2024 · 0 comments
Open
5 tasks

✨ New ZeroAsLongSerializer type #696

LVMVRQUXL opened this issue Jul 22, 2024 · 0 comments
Labels
common Item related to all platforms. feature New feature or request.

Comments

@LVMVRQUXL
Copy link
Contributor

📝 Description

Similarly to #690, in the types-kotlinx-serialization subproject, we want to introduce the ZeroAsLongSerializer experimental type for serializing the Zero type as Long.

class ZeroAsLongSerializer : 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
}

This serializer should be available for all Kotlin platforms.

✅ Checklist

  • ✨ Add the type and its public constructor with tests, documentation and samples.
  • ✨ Override the toString function with tests, documentation and samples.
  • ✨ Override structural equality operations (equals and hashCode functions) with tests, documentation and samples.
  • ✨ Make the type implementing the KSerializer<Zero> type with tests, documentation and samples.
  • 📝 Update the unreleased changelog for this issue.
@LVMVRQUXL LVMVRQUXL added feature New feature or request. common Item related to all platforms. labels Jul 22, 2024
@LVMVRQUXL LVMVRQUXL modified the milestones: 4.5.3, 4.5.4 Jul 22, 2024
@LVMVRQUXL LVMVRQUXL modified the milestone: 4.5.3 Jul 28, 2024
@LVMVRQUXL LVMVRQUXL removed this from the 4.5.3 milestone Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common Item related to all platforms. feature New feature or request.
Projects
None yet
Development

No branches or pull requests

1 participant