JSON

 17th October 2020 at 8:00am

Definition

JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999.

Libraries

  • JavaScript: built-in library JSON
  • Python: standard library json
  • C++
    • rapidjson
    • jsoncpp

Tools

GUI Viewer

FoldingPlatformHandle Large File (>10mb)Format / Compact
JSON EditorYNY
JSON ViewerYNY

Many editor or IDE can handle JSON files too. But some of them may not be able to handle large files (>10mb):

  • Java-based IDE (IntelliJ-based IDE)
  • Chromium-based Editor / IDE (VSCode, Atom, etc.)

CLI Viewer

PlatformHandle Large File (>10mb)Format / Compact
jq YY
Vim YY

Filtering and Generating

  • JMESPath: a query language for JSON with a complete grammar specification (should be precise and consist). Should consider learn this first.
  • jq: like sed for JSON data
  • jid: json incremental digger using filtering queries like jq. It's very helpful for dealing with large JSON data
  • JSON-Splora: a GUI frontend for fq, built with Electron
  • jpmens/jo: generating JSON from command line
  • dflemstr/rq: perform queries on streams of records in various formats

jid and JSON-Splora should not be able to handle large files. They are not efficiency enough.

Comparison

More Resources