Skip to content

JSON Patch? #4

@NV

Description

@NV

Have you considered using JSON Patch? It’s more efficient when it comes to patch size.

> require('patcher').computePatch([1,2,3,4,5], [2,3,4,5])
{ '0': 2,
  '1': 3,
  '2': 4,
  '3': 5,
  '$r': 4 }

JSON Patch using remove operation:

{ "remove": "0" }

It also has handy add, move, and replace operations.

https://github.com/bruth/jsonpatch-js is a partial implementation (applies patches, doesn’t yet generate them).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions