Handle JSON like data structures with a "repr(...)" fallback, e.g. for MongoDB types
Project description
json-repr
Pretty print JSON like data structures with a "repr(...)" fallback, e.g. for MongoDB types
Usage
import json_repr
source = """{
"_id" : ObjectId("507f1f77bcf86cd799439011"),
"persons": [
{
"name": "Alice"
"id": NumberInt(1)
},
{
"name": "Bob"
"id": NumberInt(2)
}
]
}"""
persons = json_repr.eval_mongo_db_json(source)
print(persons)
print()
print(json_repr.dumps(persons))
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
json_repr-1.1.8.tar.gz
(3.9 kB
view hashes)
Built Distribution
Close
Hashes for json_repr-1.1.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2909eac20559d2c571f5442699499374c24a32c402c9e45f338b457f86fae687 |
|
MD5 | 3700342d912a7e2cd38a1ecc85b76ba7 |
|
BLAKE2b-256 | df0dc8f50ce36ba210d56d6fbee96c5339b871b90ef20d1b0ee1a718582ebba3 |