Copy code
Jsonomy
Jsonomy is a basic JSON parser that converts API's JSON output to be more Pythonic. It includes functionalities like converting camel case to snake case, and timestamps to datetime objects.
Features
- Convert JSON keys from camel case to snake case.
- Identify strings that represent dates and convert them to datetime objects.
- Recursively process JSON data structures.
Installation
To install Jsonomy, you can use pip:
pip install jsonomy
Usage
from jsonomy import Jsonomy
data = {
"createdAt": "2022-07-01T10:00:00Z",
"someNestedData": {
"moreDetails": "data"
},
"aList": ["item1", "item2"]
}
# load data into Jsonomy and process
formatter = Jsonomy(data)
processed = formatter.format()
# print the processed data
formatter.pprint()
# reload new data
formatter.load(data)
#load and format
Jsonomy(data).format()
#load and pretty print to a string
pretty_json = Jsonomy(data).pprint(as_str=True)
License
This project is licensed under the terms of the MIT license.
Contact
For questions, feel free to reach out to Lewis Morris at lewis.morris@gmail.com
Metadata
Release files for jsonomy 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jsonomy-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for jsonomy-0.0.3-py3-none-any.whl |
Release files / jsonomy-0.0.3-py3-none-any.whl
| Download URL | jsonomy-0.0.3-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a4eafde60e1605ea1af04ffd58a90df228a946e01a4327379e8122323071629e
|
|
BLAKE2b-256 checksum How to use checksums |
98b29b70439b9d99f7d0160e8dbaa80d88d22b628637c4db0c4fd2371b940f7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for jsonomy 0.0.3
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.