Skip to content

Supports deserialization of value class (inline class). #650

Closed
@k163377

Description

@k163377

jackson-module-kotlin currently does not support deserialization of value class.
This issue summarizes information about deserialization support for value class.

About why jackson-module-kotlin has difficulty supporting value class.

The main reason it is difficult to support value class in jackson-module-kotlin is that the bytecodes for the value class and its associated arguments and return values are different than usual.
Jackson is a Java Reflection based library and cannot fully parse such content.
As far as I have tried in the experimental project described below, I have already found that full support is impractical unless an option is provided by Kotlin to ensure compatibility.

Implementation status of value class support.

value class support is being preliminarily implemented in the following experimental project.
At this time, I have confirmed that it works in many major cases, even for deserialization.
https://github.com/ProjectMapK/jackson-module-kogera

The implementation of this project will be incorporated into jackson-module-kotlin in the future.

The following issue also has information.
#199 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions