We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
extension types
kotlinx.serialization
Kotlin's JSON serialization library(kotlinx.serialization) supports the value class in the following way:
Code:
@Serializable @JvmInline value class Color(val rgb: Int) @Serializable data class NamedColor(val color: Color, val name: String) fun main() { println(Json.encodeToString(NamedColor(Color(0), "black"))) }
Json:
{"color": 0, "name": "black"}
I'm wondering if this package will support Json serialization in a similar way to Kotlin.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Kotlin's JSON serialization library(
kotlinx.serialization
) supports the value class in the following way:Code:
Json:
I'm wondering if this package will support Json serialization in a similar way to Kotlin.
The text was updated successfully, but these errors were encountered: