0

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.

4

1 回答 1

0

json0(和其他 ShareDB 类型)不只是定义补丁的“形状”:它们还实现了许多负责执行操作转换的方法,因此它们需要使用他们定义的操作形状。

您的选择是:

  • 忽略您的 CRF-6902 补丁并创建新的 ShareDB 补丁
  • 研究如何将 CRF-6902 补丁转换为json0补丁
  • 编写您自己的与 CRF-6902 一起使用的 OT 类型
于 2021-04-17T06:40:55.643 回答