1

We have a complex JSON document. We currently manage changes with GET/POST operations involving the entire document. We would like to stop sending the entire document back and forth, so we are looking into JSON Patch.

There are libraries to generate the patch documents as specified in RFC 6902. In order to generate the patch documents, it seems necessary for the client to maintain a copy of the large document..make the changes client side, generate the patch document, patch the 'working copy'on the client, send HTTP PATCH to server, and apply the patch on the server side.

This makes it seem necessary to insure the client representation of the complete document and the server representation are synchronized.

Is this an appropriate approach, or is there better guidance?

jparram
  • 804
  • 8
  • 24
  • 1
    Yes it's possible, check out [Palindrom](https://palindrom.github.io/) – Omar Alshaker Jan 28 '18 at 00:11
  • @OmarAlshaker looks promising. Is there an example of a 'round trip'? E.g. document is loaded from persistence server side, sent to client, initialization/synchronization is established...client session ends, persistence is updated. – jparram Jan 29 '18 at 18:15

0 Answers0