Skip to main content

JSON

  • rfc6901 - JavaScript Object Notation (JSON) Pointer
  • automerge/automerge
    • A JSON-like data structure that can be modified concurrently by different users, and merged again automatically.

Schema#

Patch#

  • rfc6902 - JSON Patch
    • 基于操作 - op, path, value - 更适用于复杂场景
    • op = add, remove, replace, move, copy, test
    • test 用于断言,断言失败则操作失败
      • 例如 { "op": "test", "path": "/a/b/c", "value": "foo" }
  • rfc7396 - JSON Merge Patch
    • 基于文档合并 - {"key":"new value"} - 适用于简单场景
    • 设置 key 为 null 表示删除
    • 数组只能替换
    • 合并操作不会出错
  • jsonpatch
  • flipkart-incubator/zjsonpatch

Diff#

FAQ#

JSON Patch and JSON Merge Patch#

时间格式选择#