Skip to content

Feature request: support kotlinx.serialization #19

@yrom

Description

@yrom

Hi @wuseal ,very thanks for your awesome work.
Could you add support for the project kotlinx.serialization ?

  • Class should annotated with @Serializable
  • @Optional for optional property, but require default values
  • @SerialName for override property name with custom name

e.g.

@Serializable
class Data(val a: Int = 0, 
    @Optional val b: Int = 42, 
    @SerialName("c") val custom: String)


assertEquals("{a: 1, b: 42, c: test}", JSON.unquoted.stringify(Data(custom="test")))

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions