0

While almost all text-editors can view .json files, I am sure there are some or one which show .json files in all its glory. Could somebody share name or names of native .json viewers rather than text-editors which can also show .json files. I am looking to know about the earliest tools which are/were used to view .json files. Looking to see raw .json output rather than pretty output.

5
  • JSON is plain text. This question makes no sense. If you don't want syntax highlighting, just turn it off in your editor.
    – naught101
    Nov 7, 2018 at 0:34
  • any format text or otherwise need to have support built-in from an app. My aim was two-fold, to understand the code which makes up .json file so I could replicate the same and to have some sort of historical perspective as to where it came from.
    – shirish
    Nov 7, 2018 at 2:27
  • 1
    JSON is plain ASCII text. Anything that that reads plain text can read it. There is no need for a special app, just as there is no need for a special app for reading HTML or just about any other markup or programming languages. If you want to have a historical perspective, read en.wikipedia.org/wiki/JSON#History - if you want an overview of the syntax, read the next section on the same page.
    – naught101
    Nov 7, 2018 at 4:54
  • 1
    Yes, this question is strange, but I for once got here because I was looking for a GUI viewer of JSON, which can show it in a tree (colapse etc.), and maybe also handle jsonpath or some other search mechanism. At least some standalone viewer which can do as much as the browser's developer tools. Oct 24, 2020 at 11:35
  • Nevermind, opening the JSON with Firefox does the trick for me. Oct 24, 2020 at 11:42

2 Answers 2

11

jq is a json processor (like sed for json) which can also be used to pretty-print json documents.

 cat yourfile.json | jq
3
  • I have updated my question so its better understood what I'm looking for.
    – shirish
    May 14, 2017 at 1:14
  • 2
    Also jq . file.json.
    – Kusalananda
    May 14, 2017 at 7:20
  • very nice utilite)) Feb 15, 2021 at 7:46
7

The "earliest" and "most basic" tool I can think of that may be used to display the contents of a JSON file is cat:

$ cat file.json

This will not do pretty-printing and it will show the "raw JSON", i.e. the file as it is.

The cat utility was available in at least the 2nd release of Unix from Bell Labs in around 1972.

The JSON format was first introduced in the early 2000s.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .