Skip to main content

Extension for JSONPatch (RFC6902) that introduces operation preconditions, change tracking and automated listeners that can introduce new operations based on the previous change

Project description

JSONPatch-Trigger

This package extends the JSON Patch (RFC 6902) functionality with the following features:

  • Preconditions for operations that prevent their execution
  • Usage of JSONPaths over JSONPointers to allow operation targets with wildcards and conditions
  • Change tracking of each operation (a list of additionas and deletions as JSONPointers)
  • Listeners that can react to the tracked changes to dynamically perform customizable actions when something in the JSON document has changed

The JSONPath and JSONPatch implementations used as a basis are from https://pypi.org/project/python-jsonpath/

Use Case

The functionalities in this package have been developed to serve the following use case:

A process P produces JSON objects. Every time P executes the results needs to be adjusted with changes the user can configure. So the set of operations is persisted and applied for every process run. There are different processes and each requires a different set of user operations. Additionally, the produced JSON objects can have patterns that can be changed automatically instead of with a manual user action. However, the automated steps might be dependent on the order of user operations. So instead of appending or prepending the automated operations, a listener approach is used to apply the automated operation as soon as a certain path in the document is modified (triggered). For this to work properly the first operation is always an AddOperation that adds the entire existing object therefore the tracking produces an addition for every JSONPointer in the document.

CI Debug Counter

3

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jsonpatch_trigger-0.2.0.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jsonpatch_trigger-0.2.0-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

Details for the file jsonpatch_trigger-0.2.0.tar.gz.

File metadata

  • Download URL: jsonpatch_trigger-0.2.0.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for jsonpatch_trigger-0.2.0.tar.gz
Algorithm Hash digest
SHA256 16107233e2199d74732af6b7afa1fe59150b229683172844905f9ae9e3d23886
MD5 b44b14b361555be07576583c5ec322cc
BLAKE2b-256 7eb9c2e3b03606ebe131f9a3f10d240d2b8f3526d4d56821f73329f1307e4ff3

See more details on using hashes here.

Provenance

The following attestation bundles were made for jsonpatch_trigger-0.2.0.tar.gz:

Publisher: ci.yaml on Cpprentice/jsonpatch-trigger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jsonpatch_trigger-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for jsonpatch_trigger-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6002d7f8934c2ede0a85d5e7bc561954d814b0674cfd0394ba34855d030f2d3f
MD5 f8f4a01b28b08f7c18959e2a6de831f5
BLAKE2b-256 2aa97224b0d42f4ed05dbfb8de71094c1923b24587cbc624b9a270e33b49482c

See more details on using hashes here.

Provenance

The following attestation bundles were made for jsonpatch_trigger-0.2.0-py3-none-any.whl:

Publisher: ci.yaml on Cpprentice/jsonpatch-trigger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page