You are here

Linting JSON On The Command Line

JSON is a strange format [I'm not a fan]. Opening a large JSON file in many text editors is unfruitful when the file is one long line - they will burn CPU trying to line wrap the data.

JSON however can be easily linted on the command line, producing a more friendly file.

cat onelongline.json | python -m json.tool > linted.json

And the file linted.json is readable and friendlier with text editors.

Tags: 

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer