Skip to main content
https://drone.io/bitbucket.org/eodolphi/json-patch/status.png

JSON Patch

Implementation of json-patch draft 04:

http://tools.ietf.org/html/draft-pbryan-json-patch-04

Installation

$ pip install json_patch

Usage

JSON patch makes it possible to patch arbitrary json objects

>>> from json_patch import Patch
>>> patch = Patch([
        {
            'op': 'add'
            'path': '/c',
            'value': 'f'
        },
        {
            'op': 'remove':
            'path': '/a'
        },
        {
            'op': 'replace'
            'path': '/b',
            'value': 'g'
        }
    ])
 >>> data = {'a': 'd', 'b': 'e'}
 >>> print patch.apply(data)
    {'b': 'g', 'c': 'f'}

Release files for json_patch 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for json_patch 0.1
File Size Uploaded
json_patch-0.1.tar.gz 2.5 kB Details

Release files / json_patch-0.1.tar.gz

Download URL json_patch-0.1.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
cfa67749e1f4704975659bd9ef36f0e2d266ed0bf5999b2046f3a30e80b8c883
BLAKE2b-256 checksum
How to use checksums
2c171f8d70831a05ed91a6ff19fb446b669810ebc4e079a6ba3e2ac1723fab27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page