JSON Pointer helpers
Project description
jsonpointer-helpers
Helpers for JSON pointers described by RFC 6901.
Installation
$ pip install jsonpointer-helpers
Usage
>>> import jsonpointer_helpers as jp
>>>
>>> jp.build({'foo': {'bar': 42}})
{'/foo/bar': 42}
>>>
>>> jp.build_pointer(['foo', 'bar'])
'/foo/bar'
>>>
>>> jp.parse_pointer('/foo/bar')
['foo', 'bar']
>>>
>>> jp.escape_token('foo~bar')
'foo~0bar'
>>>
>>> jp.unescape_token('foo~0bar')
'foo~bar'
>>>
Testing and linting
For testing and linting install tox:
$ pip install tox
...and run:
$ tox
License
jsonpointer-helpers
is licensed under the MIT license. See the license file for details.
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
Built Distribution
Close
Hashes for jsonpointer-helpers-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93d5f41050d4fe421fe449fb2725fdfa2c7fc8822eb26b8028ae0e780b39e375 |
|
MD5 | 01ddb5f61016779f4a458fdcfcd206f6 |
|
BLAKE2b-256 | 2a9c8337807428923cd3b7401502bcef2b91f5e3bfc0962a4a51ffb23315861a |
Close
Hashes for jsonpointer_helpers-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cae77d0c677580a7d10450cb4e12c8939d3321f0d90d3245c4f8185172ad4bf4 |
|
MD5 | 51db56bbf50862352dff309e176d42f9 |
|
BLAKE2b-256 | 2636d85394fd06a1b247aed512cd400d7dbe82ec82121695d4a466df7fee49bb |