Skip to content

Latest commit

 

History

History
55 lines (47 loc) · 1.18 KB

README.md

File metadata and controls

55 lines (47 loc) · 1.18 KB

Commmand of JSON tree viewer with type.

Example

$ echo '{"foo":5.0,"baz":[{"foo":{"bar":100,"baz":"click","cat":null}}],"login":true}' | jq
{
  "foo": 5,
  "baz": [
    {
      "foo": {
        "bar": 100,
        "baz": "click",
        "cat": null
      }
    }
  ],
  "login": true
}

$ echo '{"foo":5.0,"baz":[{"foo":{"bar":100,"baz":"click","cat":null}}],"login":true}' | jtr
.
├── foo <float>
├── baz [].
│     └── foo
│         ├── bar <int>
│         ├── baz <string>
│         └── cat <null>
└── login <bool>

$ echo '{"foo":5.0,"baz":[{"foo":{"bar":100,"baz":"click","cat":null}}],"login":true}' | jtr '.baz'
[].
  └── foo
      ├── bar <int>
      ├── baz <string>
      └── cat <null>

Installation

$ nimble install jtr

or get from GitHub release

$ curl -fLO https://github.com/u1and0/jtr/releases/download/v0.2.8/jtr-linux.zip
$ unzip jtr-linux.zip
$ chmod 755 ./jtr
$ ./jtr -v