Skip to content
This repository was archived by the owner on Nov 27, 2018. It is now read-only.
This repository was archived by the owner on Nov 27, 2018. It is now read-only.

@JsonProperty set on case classes methods is ignored #17

@crumbpicker

Description

@crumbpicker

The serialization of case classes includes only fields declared in the primary constructor
However it is sometimes interesting to add some extra fields (that could be used by the JsonCreator in the deserialization phase) in the resulting JSON string.

One solution to do that with Jackson is to add the @JsonProperty annotation on the method one want to serialiaze the result (see http://stackoverflow.com/questions/14362247/jackson-adding-extra-fields-to-an-object-in-serialization).

But it seems it is not supported by the current implementation of Jacks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions