Skip to content

Add JsonNodeFeature.WRITE_PROPERTIES_SORTED for sorting ObjectNode properties on serialization #3965

Closed
@cowtowncoder

Description

@cowtowncoder

(note: inspired by #3963)

So, there are ways for alphabetic output of JSON Object keys, for:

  • SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS orders Map keys
  • MapperFeature.SORT_PROPERTIES_ALPHABETICALLY orders POJO properties

but there is nothing to force this on ObjectNode (JsonNode subtype). It should be relatively simple to add this, both for general usage and possibly to help with "Canonical JSON" output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    node-configRelated to JSTEP-7 Node config/feature

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions