Sort JSON keys

Sorts every object key alphabetically, which makes two documents comparable.

  • ID: sort-json-keys
  • Category: Code tidy
  • Aliases: normalise json, canonical json, json diff prep

Arguments

ArgumentTypeDefaultConstraints
Orderoption"Ascending"Ascending, Descending
Indentnumber2Minimum: 0. Maximum: 8. Zero writes it on one line, which is what a checksum of the canonical form needs.