Replies: 1 comment
-
Done in 2df18e4. Its serializer will be provided in future commits. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It could be nice to introduce a
Zero
type in thekotools.types.number
package for representing the real life concept of the zero number.Technically, this type could be a singleton, meaning that we should provide only one instance of the
Zero
type.Here's an example of getting an instance of
Zero
from Kotlin code:Here's the same example from Java code:
An instance of the
Zero
type should at least be convertible toByte
.The serialization and deserialization processes of this type should behave like for the Byte type.
Here's an example of Kotlin code that encodes and decodes this type using the JavaScript Object Notation (JSON) format from kotlinx.serialization:
Beta Was this translation helpful? Give feedback.
All reactions