Easily format JSON in Python

Introduction

Recently, the number of scenes dealing with JSON has increased significantly. In addition, there is no line break before formatting. Even beginners who can't write python at all have Python on Linux and Mac.

Premise

  1. You have a JSON file or string.
  2. You should understand Linux commands.
  3. In the case of the following example, the JSON file is sample.json

Trial

$ python -mjson.tool sample.json

at the end

If it is wrong as JSON, the number of rows and columns will be displayed if it is wrong. Please correct it based on it.

Recommended Posts

Easily format JSON in Python
format in python
Handling json in python
Image format in Python
Format json with Vim (with python)
Output log in JSON format with Python standard logging
Convert / return class object to JSON format in Python
Python #JSON
Export DB data in json format
Write JSON Schema in Python DSL
Automatically format Python code in Vim
Handle NetCDF format data in Python
Handle GDS II format in Python
Dynamically load json type in python
Handling of JSON files in Python
Quadtree in Python --2
Python in optimization
CURL in python
Metaprogramming in Python
Python 3.3 in Anaconda
Python string format
SendKeys in Python
Data input / output in Python (CSV, JSON)
Meta-analysis in Python
Unittest in python
Easily use your own functions in Python
[Python / Django] Create a web API that responds in JSON format
Create a JSON object mapper in Python
Epoch in Python
Discord in Python
Sudoku in Python
DCI in Python
quicksort in python
nCr in python
N-Gram in Python
Best practice for logging in JSON format on AWS Lambda / Python
Programming in python
Plink in Python
Constant in python
Read and write JSON files in Python
Easily graph data in shell and Python
Lifegame in Python.
FizzBuzz in Python
Sqlite in python
StepAIC in Python
N-gram in python
LINE-Bot [0] in Python
Csv in python
Disassemble in Python
Reflection in Python
Python string format
Constant in python
nCr in Python.
Scons in Python3
Puyo Puyo in python
python in virtualenv
PPAP in Python
Download files in any format using Python
Quad-tree in Python
Reflection in Python
Chemistry in Python