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)
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.4.tar.gz
(3.3 kB
view hashes)
Built Distribution
Close
Hashes for json2txttree-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 606e0f0009972ee61d86bc80dc98b1943f530900cb766a9cda09ed700446a3c4 |
|
MD5 | 79041598f442ec9f0569c520ed865023 |
|
BLAKE2b-256 | 54527556620b2d025ee9a95c4b168f63b57c69e343a6e19d3675854b9090ae46 |