skip to navigation
skip to content

jsonderef 1.0.0

A json dereferencing tool.

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
 
File Type Py Version Uploaded on Size
jsonderef-1.0.0.tar.gz (md5) Source 2017-08-04 3KB