PyPI
pypi.org › project › jsonpointer
jsonpointer · PyPI
Repository: https://github.com/stefankoegl/python-json-pointer.git · Documentation: https://python-json-pointer.readthedocs.org/ PyPI: https://pypi.python.org/pypi/jsonpointer · Travis CI: https://travis-ci.org/stefankoegl/python-json-pointer · Coveralls: https://coveralls.io/r/stefankoegl/python-json-pointer ·
» pip install jsonpointer
Readthedocs
python-json-pointer.readthedocs.io
python-json-pointer — python-json-pointer 3.0.0 documentation
python-json-pointer is a Python library for resolving JSON pointers (RFC 6901).
GitHub
github.com › stefankoegl › python-json-pointer
GitHub - stefankoegl/python-json-pointer: Resolve JSON Pointers in Python
Resolve JSON Pointers in Python. Contribute to stefankoegl/python-json-pointer development by creating an account on GitHub.
Starred by 145 users
Forked by 42 users
Languages Python 98.8% | Makefile 1.2% | Python 98.8% | Makefile 1.2%
What is jsonpointer?
Identify specific nodes in a JSON document (RFC 6901). Visit Snyk Advisor to see a · full health score report · for jsonpointer, including popularity, security, maintenance · & community analysis.
snyk.io
snyk.io › advisor › python packages › jsonpointer
jsonpointer - Python Package Health Analysis | Snyk
Is jsonpointer popular?
The python package jsonpointer receives a total · of 10,125,038 weekly downloads. As · such, jsonpointer popularity was classified as · an · influential project. Visit the · popularity section · on Snyk Advisor to see the full health analysis.
snyk.io
snyk.io › advisor › python packages › jsonpointer
jsonpointer - Python Package Health Analysis | Snyk
Is jsonpointer safe to use?
The python package jsonpointer was scanned for · known vulnerabilities and missing license, and no issues were · found. Thus the package was deemed as · safe to use. See the full · health analysis review.
snyk.io
snyk.io › advisor › python packages › jsonpointer
jsonpointer - Python Package Health Analysis | Snyk
Readthedocs
python-json-pointer.readthedocs.io › en › latest › tutorial.html
Tutorial — python-json-pointer 3.0.0 documentation
The resolve_pointer method is basically a deep get. >>> from jsonpointer import resolve_pointer >>> obj = {"foo": {"anArray": [ {"prop": 44}], "another prop": {"baz": "A string" }}} >>> resolve_pointer(obj, '') == obj True >>> resolve_pointer(obj, '/foo') == obj['foo'] True >>> resolve_pointer(obj, '/foo/another prop') == obj['foo']['another prop'] True >>> resolve_pointer(obj, '/foo/another prop/baz') == obj['foo']['another prop']['baz'] True >>> resolve_pointer(obj, '/foo/anArray/0') == obj['foo']['anArray'][0] True >>> resolve_pointer(obj, '/some/path', None) == None True
Simon Willison
til.simonwillison.net › json › json-pointer
JSON Pointer | Simon Willison’s TILs
November 14, 2022 - It uses JSON Pointer to indicate where in a nested JSON object an error occurred. So I need to figure that out. With the help of GPT-3 I made the following notes: ... This last one is tricky: how can you tell the difference between an index into an array and the name of a key? Turns out the answer is to look at whether you are dealing with an object or an array at the time when you are processing the pointer. Here's where that is implemented in the python-json-pointer library.
Readthedocs
python-json-pointer.readthedocs.io › en › latest › mod-jsonpointer.html
The jsonpointer module — python-json-pointer 3.0.0 documentation
python-json-pointer 3.0.0 documentation ... of accessing element “-” of a list · class jsonpointer.JsonPointer(pointer)¶ · A JSON Pointer that can reference parts of a JSON document ·...
pytz
pythonhosted.org › jsondata › epydoc › jsondata.JSONPointer.JSONPointer-class.html
jsondata.JSONPointer.JSONPointer
For enhancement of the processing performance by the underlying packages 'json' and 'jsonschema', the pointer is stored and applied in two variants. * self.raw: Raw input of the pointer string for the logical API. * self.ptr: Split elements of the pointer path within a list of keys, for the programming interface.
Top answer 1 of 2
1
This is how Python and JSON works:
Either you save that exact content in a file and use:
with open('RelationshipRequest.json', 'r') as fh:
json_data = json.load(fh)
or you pass it as a string directly yourself:
json_data = json.loads('{ ... }')
Either way, the net result would be (and this is how you access JSON data):
for result in json_data['results']:
print(result['author']['objectId'])
Python doesn't treat JSON data as objects, like you're used to in JavaScript, it's a dictionary and nothing short of it so treat for what it is is my suggestion. There's probably some neat trick to convert this into class objects but this is generally how you actually use JSON data in Python.
2 of 2
0
I don't fully understand what you want to accomplish, but if all you want is to extract the objectId fields, then the following code snippet will do that.
import json
with open('RelationshipRequest.json') as f:
json_data = json.load(f)
id_list = [rec['author']['objectId'] for rec in json_data['results']]
print id_list
Jg-rp
jg-rp.github.io › python-jsonpath › pointers
JSON Pointers - Python JSONPath
The slash operator allows you to create pointers that are children of an existing pointer. from jsonpath import JSONPointer pointer = JSONPointer("/users") child_pointer = pointer / "score" / "0" another_child_pointer = pointer / "score/1" print(child_pointer) # "/users/score/0" print(another_child_pointer) # "/users/score/1"
GitHub
github.com › stefankoegl › python-json-pointer › blob › master › jsonpointer.py
python-json-pointer/jsonpointer.py at master · stefankoegl/python-json-pointer
Resolve JSON Pointers in Python. Contribute to stefankoegl/python-json-pointer development by creating an account on GitHub.
Author stefankoegl
GitHub
github.com › stefankoegl › python-json-pointer › blob › master › doc › tutorial.rst
python-json-pointer/doc/tutorial.rst at master · stefankoegl/python-json-pointer
The resolve_pointer method is basically a deep get. >>> from jsonpointer import resolve_pointer >>> obj = {"foo": {"anArray": [ {"prop": 44}], "another prop": {"baz": "A string" }}} >>> resolve_pointer(obj, '') == obj True >>> resolve_pointer(obj, '/foo') == obj['foo'] True >>> resolve_pointer(obj, '/foo/another prop') == obj['foo']['another prop'] True >>> resolve_pointer(obj, '/foo/another prop/baz') == obj['foo']['another prop']['baz'] True >>> resolve_pointer(obj, '/foo/anArray/0') == obj['foo']['anArray'][0] True >>> resolve_pointer(obj, '/some/path', None) == None True
Author stefankoegl
Rosetta Code
rosettacode.org › wiki › JSON_pointer
JSON pointer - Rosetta Code
March 1, 2026 - Note that jq's `getpath/1` cannot be used directly as it does not raise errors in the way required of JSON Pointer. # JSON Pointer # The characters '~' (%x7E) and '/' (%x2F) have special meanings in JSON Pointer, # so '~' needs to be encoded as '~0' # and '/' needs to be encoded as '~1' # when these characters appear in a reference token.
pytz
pythonhosted.org › jsondata › jsondata_pointer_operations.html
Process data by ‘jsondata.JSONPointer’ — jsondata 0.2.18 documentation
import jsondata.JSONPointer jdata = { 'a': { 'b': { 'c': 2, 'd': 3 } } } a = JSONPointer("/a/b/c") b = JSONPointer("/x/y") c = JSONPointer("/2/x/y/v") d = JSONPointer("/a/b/d") print a(jdata) + d(jdata) print JSONPointer(a(jdata) + d(jdata))
Arch Linux
archlinux.org › packages › extra › any › python-jsonpointer
Arch Linux - python-jsonpointer 3.0.0-3 (any)
python-wheel (make) electrum · pcp-pmda-json · python-cfn-lint · python-flex · python-jsonpatch · python-jsonschema (optional) pcp (make) python-voila (make) python-jsonschema (check) View the file list for python-jsonpointer · View the soname list for python-jsonpointer ·
Anaconda.org
anaconda.org › anaconda › jsonpointer
jsonpointer - anaconda | Anaconda.org
Documentation https://python-json-pointer.readthedocs.io
Sourceforge
jsondata.sourceforge.io › jsondata_pointer_operations.html
Process data by ‘jsondata.jsonpointer’ — jsondata 0.2.22 documentation
The current release provides the standard absolute pointers and the newly upcoming relative pointers. The JSON Pointer is commonly modeled within the Python implementation as a list of path items.
Anaconda.org
anaconda.org › conda-forge › jsonpointer
jsonpointer - conda-forge | Anaconda.org
Install jsonpointer with Anaconda.org. Identify specific nodes in a JSON document (RFC 6901)