Human JSON
human_json is a simple python library, that can take a JSON Object, and create a pretty string for that object.
JSON is easy to transport, and quite easy to read, but requires some form of prior training to properly understand it. This library allows one to transform JSON Objects into an easier to read format
Example
The following Python dictionary (which can represent a JSON Object):
{
'className': 'ComputerScience',
'classId': 2020,
'assignments': {
'assignment1': {
'average_grade': 5.5,
'description': 'Complete Assignment 1',
'grades': [5, 5, 5, 7]
},
'assignment2': {
'average_grade': None,
'description': 'Complete Assignment 2',
'grades': ()
}
},
'students': ('student1', 'student2', 'studentabc', 2019, None, 10.5),
}
turns into the following pretty string:
className: ComputerScience
classId: 2020
assignments:
assignment1:
average_grade: 5.5
description: Complete Assignment 1
grades:
5
5
5
7
assignment2:
average_grade: None
description: Complete Assignment 2
grades:
students:
student1
student2
studentabc
2019
None
10.5
Custom Prefixes
You can also specify an optional prefix, that will be prefixed to each line. A possible prefix is "* ". Using this prefix, will return a markdown list. This can be directly copy-pasted into a markdown file, for example:
- className: ComputerScience
- classId: 2020
- assignments:
- assignment1:
- average_grade: 5.5
- description: Complete Assignment 1
- grades:
- 5
- 5
- 5
- 7
- assignment2:
- average_grade: None
- description: Complete Assignment 2
- grades:
- assignment1:
- students:
- student1
- student2
- studentabc
- 2019
- None
- 10.5
Custom Indentations
You can also specify a custom indentation. The default is \t, but you can specify or even a number of spaces.
Below is an example using 2:
className: ComputerScience
classId: 2020
assignments:
assignment1:
average_grade: 5.5
description: Complete Assignment 1
grades:
5
5
5
7
assignment2:
average_grade: None
description: Complete Assignment 2
grades:
students:
student1
student2
studentabc
2019
None
10.5
Metadata
Release files for human-json 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| human-json-0.1.2.tar.gz | 3.8 kB | Without provenance | Details for human-json-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| human_json-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for human_json-0.1.2-py3-none-any.whl |
Total release size: 7.6 kB
Release files / human-json-0.1.2.tar.gz
| Download URL | human-json-0.1.2.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7674d5239fbf2e1e3babad72c44983574780151008a0bfd168f4cf8aa832d08e
|
|
BLAKE2b-256 checksum How to use checksums |
097f8bad967052f2dee5600137a27c741c996c6af6ee47fd12e5e3c51b44385c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/0.12.17 CPython/3.6.8 Linux/4.4.0-17763-Microsoft
|
Release files / human_json-0.1.2-py3-none-any.whl
| Download URL | human_json-0.1.2-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aeebcc2e6eb02f60817e9ac7178c301ff95529322bd1ceeb8262b18f32600745
|
|
BLAKE2b-256 checksum How to use checksums |
422e25f86e399bae2501fa61c762ee7a19a1345deee31059776d4f2e36e1b2f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/0.12.17 CPython/3.6.8 Linux/4.4.0-17763-Microsoft
|
Security for human-json 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.