简体   繁体   中英

ShareDB with JSON-Patch (CRF-6902)

If I read the documentation correctly, one needs to create "JSON0 OT Type" records for any change in the target data-model and send these to the ShareDB backend for transformation and forwarding to other clients. There also seems to be a newer "JSON1 OT Type".

Since I have a libray which already produces JSON-Patch records, I was wondering if it is possible to use this JSON-Patch (CRF-6902) standard to specify the changes to the ShareDB backend.

json0 (and other ShareDB types) don't just define a "shape" of the patch: they also implement a number of methods that are responsible for performing operational transform, so they need to use the op shape they've defined.

Your options are:

  • Disregard your CRF-6902 patches and create new ShareDB patches
  • Work out how to transform CRF-6902 patches into json0 patches
  • Write your own OT type that works with CRF-6902

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM