Skip to main content

JSON Pointer helpers

Project description

jsonpointer-helpers Build Status codecov

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jsonpointer-helpers-0.1.0.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

jsonpointer_helpers-0.1.0-py2.py3-none-any.whl (2.6 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page