Library for pretty printing json data to txt files
Project description
json2txttree
Python code that converts JSON data to tree-like output for documentation or pretty printing
Usage
import json
from json2txttree import json2txttree
# Load json data
with open('sample.json', 'r') as f:
jsonData = json.load(f)
# Pretty print json hierarchy as a tree
print(json2txttree(jsonData))
└─ (object)
├─ "name" (string)
├─ "age" (number)
├─ "languages" (array)
│ └─ (string)
├─ "subjects" (object)
│ ├─ "Math" (number)
│ └─ "Science" (number)
└─ "ids" (array)
└─ (object)
├─ "name" (string)
└─ "number" (string)
1.0.0 (2022-03-18)
Updates for pip release.
0.1.0 (2022-03-18)
Initial release.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
json2txttree-1.0.0.tar.gz
(3.3 kB
view hashes)
Built Distribution
Close
Hashes for json2txttree-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0d96e1ef91b2e8de42255ac48e89a36d87117d352263a0cce106783a36717a5 |
|
MD5 | 15f7bcb094282784e30f6954c395d415 |
|
BLAKE2b-256 | 7fe7a1e8f12bf8b72afad04dd9c18730f2a01970ff1122183c2e5e45d2cf688d |