jsondiffpatch icon indicating copy to clipboard operation
jsondiffpatch copied to clipboard

Diff & patch JavaScript objects

Results 138 jsondiffpatch issues
Sort by recently updated
recently updated
newest added

There are two places in my project that use htmlFormatter. As long as one place calls htmlFormatter.hideUnchanged() or htmlFormatter.showUnchanged(), the global version will take effect. I just want to apply...

I rewrite `reverseArrayDeltaIndex` from `packages/jsondiffpatch/src/filters/arrays.ts`. Also, I added two test cases specified on the issue page. Everything else was kept unchanged. All tests are passed.

Array diff get wrong result left.json ``` [ { "id": "AA" }, { "id": "BB" }, { "id": "CC", "relation": { "A": "11", "B": "22" } } ] ``` right.json...

## Expected Behavior According to [RFC 6902 Section 4.1](https://datatracker.ietf.org/doc/html/rfc6902#section-4.1), when the path ends with '-', the operation should append the value to the end of the array. ## Actual Behavior...

``` let testValueA = { A: [ ["B"], 1, "C", 2, "C" ] } let testValueB = structuredClone(testValueA); let delta = jsondiffpatch.diff(testValueA, testValueB); ``` delta should be undefined but instead...

This is NOT a request to add non standard text diffing operations to JSONFormatter, but to change the signature of the class so that users can add it themselves by...

exporting parseTextDiff separately from BaseFormatter, so it can be used when extending JSONFormatter without including the whole BaseFormatter

Support extending JSONFormatter with custom text diff operations, and fix a potential bug where MovedDelta is identified as a TextDiffDelta: ``` if (itemDelta[2] === 3) { throw new Error( "JSONPatch...

Hi, I see that there is a [custom formatter](https://github.com/benjamine/jsondiffpatch/blob/master/docs/formatters.md#json-patch-rfc-6902) designed to convert from the jsondiffpatch format to RFC 6902. Is there a way to go in the reverse direction? I've...

featurereq
rfc6902

Applying a series of patches can modify the patch before it, if the first patch is adding a nested object and the second is modifying it. `cloneDiffValues: true` doesn't help....