{
    "content": [
        {
            "type": "text",
            "text": "# jsonpointer (pydoc)\n\n**Summary:** jsonpointer - Identify specific nodes in a JSON document (RFC 6901)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **CLASSES** (6 lines) — 3 subsections\n  - class EndOfList (21 lines)\n  - class JsonPointer (68 lines)\n  - class JsonPointerException (67 lines)\n- **FUNCTIONS** (1 lines) — 6 subsections\n  - escape (1 lines)\n  - pairwise (13 lines)\n  - resolve_pointer (34 lines)\n  - set_pointer (17 lines)\n  - tee (2 lines)\n  - unescape (1 lines)\n- **DATA** (4 lines)\n- **VERSION** (2 lines)\n- **AUTHOR** (2 lines)\n- **FILE** (3 lines)\n\n## Full Content\n\n### NAME\n\njsonpointer - Identify specific nodes in a JSON document (RFC 6901)\n\n### CLASSES\n\nbuiltins.Exception(builtins.BaseException)\nJsonPointerException\nbuiltins.object\nEndOfList\nJsonPointer\n\n#### class EndOfList\n\n|  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\n#### class JsonPointer\n\n|  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 0x7f535a2a09a0>)\n|\n|  getpart(self, doc, part)\n|      Returns the next step in the correct type\n|\n|  resolve(self, doc, default=<object object at 0x7f535a2a09a0>)\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\n#### class JsonPointerException\n\n|  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\n### FUNCTIONS\n\n#### escape\n\n#### pairwise\n\nTransforms 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\n#### resolve_pointer\n\nResolves 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\n#### set_pointer\n\nResolves 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\n#### tee\n\nReturns a tuple of n independent iterators.\n\n#### unescape\n\n### DATA\n\nlicense = 'Modified BSD License'\nwebsite = 'https://github.com/stefankoegl/python-json-pointer'\nunicodeliterals = Feature((2, 6, 0, 'alpha', 2), (3, 0, 0, 'alpha', ...\n\n### VERSION\n\n2.0\n\n### AUTHOR\n\nStefan Kögl <stefan@skoegl.net>\n\n### FILE\n\n/usr/lib/python3/dist-packages/jsonpointer.py\n\n"
        }
    ],
    "structuredContent": {
        "command": "jsonpointer",
        "section": "",
        "mode": "pydoc",
        "summary": "jsonpointer - Identify specific nodes in a JSON document (RFC 6901)",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "CLASSES",
                "lines": 6,
                "subsections": [
                    {
                        "name": "class EndOfList",
                        "lines": 21
                    },
                    {
                        "name": "class JsonPointer",
                        "lines": 68
                    },
                    {
                        "name": "class JsonPointerException",
                        "lines": 67
                    }
                ]
            },
            {
                "name": "FUNCTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "escape",
                        "lines": 1
                    },
                    {
                        "name": "pairwise",
                        "lines": 13
                    },
                    {
                        "name": "resolve_pointer",
                        "lines": 34
                    },
                    {
                        "name": "set_pointer",
                        "lines": 17
                    },
                    {
                        "name": "tee",
                        "lines": 2
                    },
                    {
                        "name": "unescape",
                        "lines": 1
                    }
                ]
            },
            {
                "name": "DATA",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "FILE",
                "lines": 3,
                "subsections": []
            }
        ]
    }
}