Jsonpatch

0 views
Skip to first unread message

Jonelle Rycroft

unread,
Aug 5, 2024, 12:56:12 PM8/5/24
to mayprogkoweb
Iam trying to figure out the best way to patch a collection of objects. I am trying to change the sort order of a number of objects and was thinking jsonpatch may be the right approach. My Object Looks Like:

As well as supporting proper domain events in my store and projections, it might sometimes be useful to offer a more crud-like patching model. For instance; if the business logic, validation, etc. was applied at a higher level leaving only the need to persist the outcome in a generalised way.


I see no reason not to add jsonpatch.min.js as a (3kb) one-liner to the top of your projection code, and if your particular application is just changes to a json-document-state, then it seems like a great implementation to me.


Python-json-patch is a Python module (a library) to apply JSON Patchesaccording to the IETF draft specification.From the IETF site:JavaScript Object Notation (JSON) [RFC4627] is a common format for theexchange and storage of structured data. HTTP PATCH [RFC5789] extends theHypertext Transfer Protocol (HTTP) [RFC2616] with a method to perform partialmodifications to resources.JSON Patch is a format (identified by the media type "application/json-patch") for expressing a sequence of operations to apply to a target JSONdocument, suitable for use with the HTTP PATCH method.This format is also potentially useful in other cases when it's necessary tomake partial updates to a JSON document.This package provides the Python 3.x module. Other Packages Related to python3-jsonpatch depends recommends suggests enhances dep:python3 interactive high-level object-oriented language (default python3 version) dep:python3-json-pointer (>= 1.9) resolve JSON pointers - Python 3.x Download python3-jsonpatch Download for all available architectures ArchitecturePackage SizeInstalled SizeFiles all12.0 kB55.0 kB [list of files] This page is also available in the following languages (How to set the default document language):

3a8082e126
Reply all
Reply to author
Forward
0 new messages