A json dereferencing tool.
Project description
jsonderef
A json dereferencing library for python.
Json pointers evaluation is compliant with rfc 6901 (https://tools.ietf.org/html/rfc6901).
Installation
Best way is to use pip.
pip install jsonderef
Usage
from jsonderef import JsonDeref
document = {
"key": "value",
"ref": {"$ref": "#/key"},
"array_ref": [ {"$ref": "#/key"}],
"nested_ref": { "nest": {"$ref": "#/nested_ref"}}
}
dereferencer = JsonDeref(document)
print dereferencer.deref(max_deref_depth=5)
Tests
Clone the repo, install dependencies and run nose.
virtualenv env
. env/bin/activate
pip install -r requirements.txt
nosetests tests.py
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
jsonderef-1.0.0.tar.gz
(3.6 kB
view details)
File details
Details for the file jsonderef-1.0.0.tar.gz
.
File metadata
- Download URL: jsonderef-1.0.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eea34b820bda4bf6d666f067a7bd3b6977f72e50c40ef34e0436f8e1be207a26 |
|
MD5 | 8e349aa7a722c09109fc88ef256e4119 |
|
BLAKE2b-256 | e6a208143127209a9e53b122f8452d368df6ec71b7aa2750b8037ee94473702d |