PPointerMallow
Product

Product features · JSON Pointer navigation

01

Keep escaped object-key fixtures next to the lookup code and trace each decoded segment before it chooses a dictionary member or list index.

01

Connection

Base URL, credentials and a reachable server.

02

Selection

A model available through the configured endpoint.

03

Capabilities

Context limits and tool support are determined by the model and server.

JSON Pointer navigation

● ● ●PointerMallow●
A concrete starting point · JSON Pointer navigation ×
import re
def pointer_get(root, pointer):
    if not isinstance(pointer, str): raise ValueError("pointer text")
    if pointer == "": return root
    if not pointer.startswith("/"): raise ValueError("root slash")
    value = root
    for raw in pointer[1:].split("/"):
        if re.search(r"~(?![01])", raw): raise ValueError("escape")
        key = raw.replace("~1", "/").replace("~0", "~")
        if isinstance(value, dict): value = value[key]
        elif isinstance(value, list):
            if not re.fullmatch(r"0|[1-9][0-9]*", key):
                raise ValueError("array index")
            if len(key) > len(str(len(value))): raise IndexError(key)
            value = value[int(key)]
        else: raise ValueError("not a container")
    return value
✳Resolve a JSON Pointer against dictionaries and lists without editing them.
✓ ChangesReview before applying ↗
Illustrative workspace
AI coding workspace

Your next change starts here.

Get the Windows app ↗