Prettify JSON
Simple python script that prints JSON in a human-readable format.
Quickstart
Example of script launch on Linux, Python 3.5:
$ python pprint_json.py <path to file>
[
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Task 1"
]
},
{
"cell_type": "raw",
"metadata": {},
"source": [
"x1 = 3.543 \n",
"x2 = 4.184 \n",
"x3 = 3.488 \n",
"x4 = 4.30\n",
"\n",
"+------+---------+----+\n",
"| x | y | y1 |\n",
"+------+---------+----+\n",
"| 3,50 | 33.1154 | 33 |\n",
"| 3,55 | 34.8133 | 34 |\n",
"| 3,60 | 36.5982 | 37 |\n",
"| 3,65 | 38.4747 | 38 |\n",
"| 3,70 | 40.4473 | 40 |\n",
"| 3,75 | 42.5211 | 43 |\n",
"| 3,80 | 44.7012 | 45 |\n",
"| 3,85 | 46.9931 | 47 |\n",
"| 3,90 | 49.4012 | 49 |\n",
"| 3,95 | 51.9354 | 52 |\n",
"| 4,00 | 54.5982 | 55 |\n",
"| 4,05 | 57.3975 | 57 |\n",
"| 4,10 | 60.3403 | 60 |\n",
"| 4,15 | 63.4340 | 63 |\n",
"| 4,20 | 66.6863 | 67 |\n",
"+------+---------+----+\n"
. . .
How to Launch Tests
You can launch auto tests via
python tests.py
You can also launch any of them manually via
python pprint_json.py "./testcases/actual/{testname}"
Project Goals
The code is written for educational purposes. Check root repo for details.