-
Notifications
You must be signed in to change notification settings - Fork 4
Home
Shai Gabai edited this page Oct 9, 2017
·
11 revisions
Jacksync provides a library for synchronization by producing and applying a JSON patches to Java objects. Inspired by RFC 6902 (JSON Patch) and RFC 7386 (JSON Merge Patch) written in Java, which uses Jackson at its core.
- synchronization - enables an efficient data synchronization between clients and masters (or any set of nodes that share a resource).
- allows you to update a JSON document by sending the changes rather than the whole document.
- RFC 6902 (JSON Patch) - add, remove, replace, move, copy, test.
- RFC 7386 (JSON Merge Patch) - merge patch document.
- JSON "diff" with two optional strategies:
- simple - RFC 6902 (JSON Patch) operations.
- merge - using both RFC 6902 (JSON Patch) operations with a unique merge operation based on RFC 7386 (JSON Merge Patch) that can minimize the amount of the operations and JSON document length.
- enables simple commit and audit all JSON Patch changes in your data, and later on browse the detailed change history.
- enables "reverse" patches using diff processor.
- version - client received version.
- masterVersion- master version after committing all patch operations.
- targetChecksum - target object after applying all patch operations.
- operations - all patch operations.
{
"version" : 5,
"masterVersion" : 6,
"targetChecksum" : "Checksum",
"operations" : [
{ "op" : "replace", "path" : "/title", "value" : "How To Use Sync Jacksync Data" },
{ "op" : "add", "path" : "/author", "value" : "shagaba" },
{ "op" : "add", "path" : "/tags/3", "value" : "sync" },
{ "op" : "replace", "path" : "/version", "value" : 6 },
{ "op" : "test", "path" : "/version", "value" : 6 }
]
}