{
    "mode": "pydoc",
    "parameter": "jsonpointer",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/pydoc/jsonpointer/json",
    "generated": "2026-06-15T11:23:51Z",
    "sections": {
        "NAME": {
            "content": "jsonpointer - Identify specific nodes in a JSON document (RFC 6901)\n",
            "subsections": []
        },
        "CLASSES": {
            "content": "builtins.Exception(builtins.BaseException)\nJsonPointerException\nbuiltins.object\nEndOfList\nJsonPointer\n",
            "subsections": [
                {
                    "name": "class EndOfList",
                    "content": "|  EndOfList(list)\n|\n|  Result of accessing element \"-\" of a list\n|\n|  Methods defined here:\n|\n|  init(self, list)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  repr(self)\n|      Return repr(self).\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n"
                },
                {
                    "name": "class JsonPointer",
                    "content": "|  JsonPointer(pointer)\n|\n|  A JSON Pointer that can reference parts of an JSON document\n|\n|  Methods defined here:\n|\n|  contains(self, item)\n|      Returns True if self contains the given ptr\n|\n|  eq(self, other)\n|      Compares a pointer to another object\n|\n|      Pointers can be compared by comparing their strings (or splitted\n|      strings), because no two different parts can point to the same\n|      structure in an object (eg no different number representations)\n|\n|  hash(self)\n|      Return hash(self).\n|\n|  init(self, pointer)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  contains(self, ptr)\n|      Returns True if self contains the given ptr\n|\n|  get = resolve(self, doc, default=<object object at 0x7fad576889a0>)\n|\n|  getpart(self, doc, part)\n|      Returns the next step in the correct type\n|\n|  resolve(self, doc, default=<object object at 0x7fad576889a0>)\n|      Resolves the pointer against doc and returns the referenced object\n|\n|  set(self, doc, value, inplace=True)\n|      Resolve the pointer against the doc and replace the target with value.\n|\n|  tolast(self, doc)\n|      Resolves ptr until the last step, returns (sub-doc, last-step)\n|\n|  walk(self, doc, part)\n|      Walks one step in doc and returns the referenced part\n|\n|  ----------------------------------------------------------------------\n|  Class methods defined here:\n|\n|  fromparts(parts) from builtins.type\n|      Constructs a JsonPointer from a list of (unescaped) paths\n|\n|      >>> JsonPointer.fromparts(['a', '~', '/', 0]).path == '/a/~0/~1/0'\n|      True\n|\n|  ----------------------------------------------------------------------\n|  Readonly properties defined here:\n|\n|  path\n|      Returns the string representation of the pointer\n|\n|      >>> ptr = JsonPointer('/~0/0/~1').path == '/~0/0/~1'\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n"
                },
                {
                    "name": "class JsonPointerException",
                    "content": "|  Method resolution order:\n|      JsonPointerException\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Data descriptors defined here:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.Exception:\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.Exception:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.BaseException:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  reduce(...)\n|      Helper for pickle.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setstate(...)\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  withtraceback(...)\n|      Exception.withtraceback(tb) --\n|      set self.traceback to tb and return self.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.BaseException:\n|\n|  cause\n|      exception cause\n|\n|  context\n|      exception context\n|\n|  dict\n|\n|  suppresscontext\n|\n|  traceback\n|\n|  args\n"
                }
            ]
        },
        "FUNCTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "escape",
                    "content": ""
                },
                {
                    "name": "pairwise",
                    "content": "Transforms a list to a list of tuples of adjacent items\n\ns -> (s0,s1), (s1,s2), (s2, s3), ...\n\n>>> list(pairwise([]))\n[]\n\n>>> list(pairwise([1]))\n[]\n\n>>> list(pairwise([1, 2, 3, 4]))\n[(1, 2), (2, 3), (3, 4)]\n"
                },
                {
                    "name": "resolve_pointer",
                    "content": "Resolves pointer against doc and returns the referenced object\n\n>>> obj = {'foo': {'anArray': [ {'prop': 44}], 'another prop': {'baz': 'A string' }}, 'a%20b': 1, 'c d': 2}\n\n>>> resolvepointer(obj, '') == obj\nTrue\n\n>>> resolvepointer(obj, '/foo') == obj['foo']\nTrue\n\n>>> resolvepointer(obj, '/foo/another prop') == obj['foo']['another prop']\nTrue\n\n>>> resolvepointer(obj, '/foo/another prop/baz') == obj['foo']['another prop']['baz']\nTrue\n\n>>> resolvepointer(obj, '/foo/anArray/0') == obj['foo']['anArray'][0]\nTrue\n\n>>> resolvepointer(obj, '/some/path', None) == None\nTrue\n\n>>> resolvepointer(obj, '/a b', None) == None\nTrue\n\n>>> resolvepointer(obj, '/a%20b') == 1\nTrue\n\n>>> resolvepointer(obj, '/c d') == 2\nTrue\n\n>>> resolvepointer(obj, '/c%20d', None) == None\nTrue\n"
                },
                {
                    "name": "set_pointer",
                    "content": "Resolves pointer against doc and sets the value of the target within doc.\n\nWith inplace set to true, doc is modified as long as pointer is not the\nroot.\n\n>>> obj = {'foo': {'anArray': [ {'prop': 44}], 'another prop': {'baz': 'A string' }}}\n\n>>> setpointer(obj, '/foo/anArray/0/prop', 55) ==     {'foo': {'another prop': {'baz': 'A string'}, 'anArray': [{'prop': 55}]}}\nTrue\n\n>>> setpointer(obj, '/foo/yet another prop', 'added prop') ==     {'foo': {'another prop': {'baz': 'A string'}, 'yet another prop': 'added prop', 'anArray': [{'prop': 55}]}}\nTrue\n\n>>> obj = {'foo': {}}\n>>> setpointer(obj, '/foo/a%20b', 'x') ==     {'foo': {'a%20b': 'x' }}\nTrue\n"
                },
                {
                    "name": "tee",
                    "content": "Returns a tuple of n independent iterators.\n"
                },
                {
                    "name": "unescape",
                    "content": ""
                }
            ]
        },
        "DATA": {
            "content": "license = 'Modified BSD License'\nwebsite = 'https://github.com/stefankoegl/python-json-pointer'\nunicodeliterals = Feature((2, 6, 0, 'alpha', 2), (3, 0, 0, 'alpha', ...\n",
            "subsections": []
        },
        "VERSION": {
            "content": "2.0\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Stefan Kögl <stefan@skoegl.net>\n",
            "subsections": []
        },
        "FILE": {
            "content": "/usr/lib/python3/dist-packages/jsonpointer.py\n\n",
            "subsections": []
        }
    },
    "summary": "jsonpointer - Identify specific nodes in a JSON document (RFC 6901)",
    "flags": [],
    "examples": [],
    "see_also": []
}