Skip to content

Add a JSON.Feature.WRITE_RECORD_FIELDS_IN_DECLARATION_ORDER for retaining Serialization order of Java Records (instead of alphabetic) #171

@cowtowncoder

Description

@cowtowncoder

As of 2.18, Java Records are fully supported. Order of property serialization is the same as for POJOs, alphabetic.
But since Records have a "natural" property ordering -- by declaration order -- it would make sense to support that.
However, with 2.18 being released and defaulting to alphabetic ordering, we'll need a feature to allow opt-in change to declaration order, leaving default to alphabetic.

Being new feature (and JSON.Feature), this needs to go in 2.19; cannot add in a patch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions