Skip to content

KotlinX.Serialization interop #16

@CLOVIS-AI

Description

@CLOVIS-AI

KotlinX.Serialization has a great serialization story with regular Kotlin:

@Serializable
class Foo(
    val username: String,
) {
    init {
        ensure(' ' !in username) { "The username cannot contain whitespace" }
    }
}

If we follow the same approach of "just annotate it with @Serializable", with our current design, it will be possible to deserialize values that are not valid.

I don't really see a good way to do this at the moment, I'm interested if you have any ideas.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions