Skip to content

Proposal: [pretty_format_json] sort json array values #1193

@bethdehart

Description

@bethdehart

I would love to have the ability to sort the json array to make easier to search for duplicate values and to keep things nice. A new flag could be added --sort-values so that the values can be sorted.

Given:

{
  "regions": [
    "us",
    "eu",
    "ba"
  ]
}

Output:

{
  "regions": [
    "ba",
    "eu",
    "us"
  ]
}

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions