Search

View JSON interactively from the terminal

Closing and opening objects with mouse click and animation.


View JSON interactively from the terminal


json-tui is a mini application written in C++ that displays JSON files interactively, making it easy to visualize.

It was developed by the same creator of RGB-TUI that we published just now time.


Installation

There are some ways to install and for different operating systems, including compiling from scratch.

But the simplest way is the one described below which is summarized in downloading the zipped binary, unzipping and installing.

To do this, run the commands below in order:

wget -q https://cutt.ly/json-tui -O json-tui.zip
unzip json-tui*
cd json-tui*/bin
sudo install -v json-tui /usr/local/bin/

Clean up the mess:

CD -
rm -rf json-tui*


Copy this example JSON:

vim example.json

{
  "glossary": {
    "title": "example glossary",
    "GlossDiv": {
      "title": "S",
      "GlossList": {
        "GlossEntry": {
          "ID": "SGML",
          "SortAs": "SGML",
          "GlossTerm": "Standard Generalized Markup Language",
          "Acronym": "SGML",
          "Abbrev": "ISO 8879:1986",
          "GlossDef": {
            "para": "A meta-markup language, used to create markup languages ​​such as DocBook.",
            "GlossSeeAlso": ["GML", "XML"]
          },
          "GlossSee": "markup"
        }
      }
    }
  }
}

And take the test:

json-tui example.json

To exit interactive mode press the letter q .

The likely output will be to display the code and you can manipulate it by clicking the opening braces: { . Example of the gif below:

json-tui

For more information and if you want to build from scratch, access the project’s repository.


terminal cpp


Share



Comments