No description
Find a file
2025-05-05 15:13:18 +09:00
.github/workflows [docs] install via github release [chore] nimble build static 2024-01-03 02:07:26 +09:00
src [add] help message 2022-10-27 12:18:36 +09:00
tests [mod] colorEcho implemented 2022-10-27 07:29:38 +09:00
.gitignore [docs] rm htmldocs 2024-01-03 01:21:37 +09:00
jtr.nimble [add] help message 2022-10-27 12:18:36 +09:00
LICENSE [add] LICENSE README 2022-10-11 21:32:08 +09:00
README.md [doc] README 2025-05-05 15:13:18 +09:00

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 compile from source

$ git clone https://github.com/u1and0/nim.git
$ cd jtr
$ nim compile -d:release src/jtr.nim
$ sudo  ln -s `pwd`/src/jtr /usr/bin

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