BuildMidBackendAuto-graded
Make a JSON Pointer resolver follow RFC 6901
resolve() crashes on the RFC's array example, mis-decodes some escaped tokens and leaks raw errors on missing paths; make it match the spec and raise ResolveError.resolve(doc, pointer) in pointer.py looks up a value in a JSON document by an RFC 6901 path such as /payload/items/0/sku. Webhook routing rules and config overrides depend on it. Today it crashes on the RFC's array example, decodes some escaped tokens wrongly, and lets a missing path reach the client as a raw KeyError or TypeError. It should follow the RFC and raise ResolveError when a pointer doesn't resolve.30 min
python
You're done when
- Every example pointer from the RFC resolves to the value the RFC gives.
- Pointers step into arrays as well as objects, at any depth.
- Escaped tokens decode exactly as the RFC defines them.
- A path that doesn't exist raises
ResolveError, never a raw lookup error. - Results match a reference implementation across a large set of generated documents and pointers.
What it measures
Data structures and algorithmsFollowing a path through objects and arrays, decoding each token before it is used.
Test case designChecking the fix against the RFC's examples and the awkward inputs, such as empty keys and escapes.
Specification fidelityGetting every rule of RFC 6901 right, including the small ones that are easy to miss.
Your environment
Terminal + editorA full shell in the browser
Coding agentAlready signed in, no API key to set up
Isolated workspaceOnly yours, wiped when you finish
Start this lab
30 min
Start labYou'll need to sign in to Anthropos first. The lab opens in a private cloud workspace with your coding agent ready to use.AI Labs is part of Anthropos Workforce. Not on your plan yet? Book a demo