Skip to content

jackharrhy/meowj

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
Command Mean [ms] Min [ms] Max [ms] Relative
meowj earth_meteorite_landings.json 30.1 ± 1.4 28.7 34.9 1.0
gron earth_meteorite_landings.json 60.8 ± 1.9 56.1 64.9 2.0
tabbyj --file earth_meteorite_landings.json 179.2 ± 4.8 172.3 189.4 5.9
catj earth_meteorite_landings.json 218.6 ± 7.1 207.4 231.4 7.3

Alternatives


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