Applying JSON Patch Operations

hard
Unit 24 · Validation0/1 to milestone

Implement a subset of JSON Patch (RFC 6902): apply_patch(doc, ops) returns a new document (the input must not be modified). Paths are JSON Pointers like /a/b/0 (with ~1 meaning / and ~0 meaning ~ in keys).

Pro problem

Unlock this and every premium problem across all tracks — plus hidden-test grading, advanced AI engineering modules and new content every week.

Start 7-day free trial
solution.py · Python 3.13
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Applying JSON Patch Operations · TechGradify