0.1.0 • Published 5 years ago

meowj v0.1.0

Weekly downloads
2
License
GPL-3.0-only
Repository
github
Last release
5 years ago

meowj

CircleCI

displays json in a flat format.

note: still a very new project, no --help or anything yet, also recusrive instead of iterative.

Install

Via Cargo

cargo install meowj

Usage

cat example.json | meowj

or

meowj example.json

example.json

{
  "array": [
    1,
    2,
    3
  ],
  "boolean": true,
  "color": "#82b92c",
  "null": null,
  "number": 123,
  "object": {
    "a": "b",
    "c": "d",
    "e": "f"
  },
  "string": "Hello World"
}

meowj output

.array[0] = 1
.array[1] = 2
.array[2] = 3
.boolean = true
.color = "#82b92c"
.null = null
.number = 123
.object.a = "b"
.object.c = "d"
.object.e = "f"
.string = "Hello World"

Benchmarks

Using this test data:

curl "https://data.nasa.gov/resource/y77d-th95.json" > earth_meteorite_landings.json
CommandMean msMin msMax msRelative
meowj earth_meteorite_landings.json21.5 ± 1.420.430.91.0
gron earth_meteorite_landings.json60.3 ± 2.754.165.22.8
catj earth_meteorite_landings.json218.5 ± 7.9207.6231.610.2

Alternatives


initially inspired by catj, but without dependencies on node/npm