Diferencia JSON como parche
json-diff-patchCalcula un JSON Patch (RFC 6902) que transforma el documento a en b. Cuándo: hay que transformar, comparar o revisar con exactitud datos estructurados (JSON, CSV, YAML, XML, arreglos). No para: aplicar un JSON Patch (json-patch-apply). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.
EN: Computes an RFC 6902 JSON Patch that transforms document a into document b (object keys diffed recursively, arrays element-wise with tail adds/removes). When: structured data (JSON, CSV, YAML, XML, arrays) has to be transformed, compared or checked exactly. Not for: applying an RFC 6902 JSON Patch (json-patch-apply). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | Source document (any JSON value; required). | |
| b | Yes | Target document (any JSON value; required). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| equal | No | ||
| patch | No | any JSON value |