unstale

pypi / jsonpatch

jsonpatch

What changed in jsonpatch 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-20.

9 breaking1 security6 new APIs and options2 performance3 behavior and defaults1 tooling21 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

jsonpatch 143 changes

Breaking changes 9

  • Python 3.10 is no longer supported.

    1.47release notes

  • Operations on missing locations raise JsonPatchPathNotFound.

    1.42release notes

  • Type stubs are now shipped as the jsonpatch-stubs package. Uninstall types-jsonpatch before upgrading because it pins jsonpatch to 1.32 and can delete jsonpatch’s own stubs when later uninstalled.

    1.41release notes

  • Removing from immutable containers now raises JsonPatchConflict.

    1.39release notes

  • Invalid patch document containers are rejected.

    1.37release notes

  • Rejects moving a location into its own children.

    1.35release notes

  • JSON diff comparison no longer treats 1 and True as equal.

    1.34release notes

  • Pointers can no longer index into strings.

    1.34release notes

  • The project supports only currently supported Python versions.

    1.34release notes

Security 1

  • Malformed patches and "from": "/-" raise the documented exceptions.

    1.35release notes

New APIs and options 6

  • Adds an opt-in JsonPatch variant for string appends.

    1.45release notes

  • Adds a utility function for joining paths.

    1.45release notes

  • Adds a utility function for splitting paths.

    1.45release notes

  • In-place patches can now be applied atomically as an opt-in.

    1.42release notes

  • JsonPatchException now exposes the failing operation as op.

    1.40release notes

  • Adds an option to generate test operations in diffs.

    1.40release notes

Performance 2

  • Finds moves without rewriting all later operations.

    1.35release notes

  • Patch operations are hashed by their op and path.

    1.35release notes

Behavior and default changes 3

  • Generated patch values are copied independently of input documents, so they no longer depend on those documents.

    1.43release notes

  • Supports whole-document operations on scalar documents.

    1.35release notes

  • Compares values using JSON equality.

    1.35release notes

Tooling 1

  • Type stubs now return concrete types, improving the specificity of return type information available to developers.

    1.44release notes

Fixes and other changes 21

  • Python 3.15 is now supported.

    1.47release notes

  • Test operations compare read-only containers recursively.

    1.46release notes

  • Fixes jsondiff/jsonpatch crashing with a raw traceback on UTF-8 BOM files.

    1.46release notes

  • Input files are closed after their documents are loaded.

    1.43release notes

  • Invalid CLI patches are rejected before the input file is modified.

    1.40release notes

  • Patch validation preserves one-shot operation iterators instead of consuming them.

    1.38release notes

  • Temporary output is cleaned up when fdopen setup fails.

    1.38release notes

  • In-place output is cleaned up after write errors.

    1.37release notes

  • JSON command-line file I/O uses UTF-8.

    1.37release notes

  • Move location helpers handle source pointer objects.

    1.37release notes

  • An in-place CLI replacement failure now preserves the original file.

    1.36release notes

  • Patch generation now honors optimization=False.

    1.36release notes

  • Closes the original input before performing an in-place replacement.

    1.35release notes

  • List diffing uses sequence alignment to avoid unnecessary replacements and cascading changes.

    1.35release notes

  • Handles self-containing values when generating a patch.

    1.35release notes

  • Adds support for Python 3.13 and 3.14.

    1.35release notes

  • Rejects '-' only when it refers to an array, rather than rejecting it in other contexts.

    1.35release notes

  • Fix operation reindexing for nested paths and other operation reindexing bugs in generated diffs.

    1.34release notes

  • Comparison ordering is deterministic, making JSON diff results consistent.

    1.34release notes

  • Applying patch operations no longer modifies the patch object.

    1.34release notes

  • Handle the whole-document pointer in the sequence branch and fix copying from that pointer.

    1.34release notes