#canonical #json #cli #object-key

app canon

Naively puts JSON into a canonical form (sorts object keys)

2 releases

0.1.1 Jun 20, 2019
0.1.0 Jun 20, 2019

#8 in #object-key

Apache-2.0

3KB

This is a command line utility to put JSON into a canonical form.

WARNING: Currently this just deserializes and researializes the JSON with serde_json, which sorts the keys in objects. It should probably be using something more intentionally canonical.

Usage:

$ echo '{ "zoology": "bar", "ambergris": "foo" }' | canon
{"ambergris":"foo","zoology":"bar"}

Installation:

You're going to need to have cargo and the other rust stuff installed. Then do:

cargo install canon

Dependencies

~0.5–1MB
~20K SLoC