JSON Patch - Document synchronization between client and server

393 Views Asked by At

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?

0

There are 0 best solutions below