json-everything / json-everything

System.Text.Json-based support for all of your JSON needs.
https://json-everything.net/
MIT License
930 stars 155 forks source link

"Diff"-ing and other Patch extensions #23

Open gregsdennis opened 3 years ago

gregsdennis commented 3 years ago

A library that can compare two JSON documents and report on their differences.

gregsdennis commented 3 years ago

I think this may actually be a good extension to the Patch library. It could analyze the differences and generate JSON Patch documents that represent the transformation from one to the other.

gregsdennis commented 3 years ago

Two more extensions:

weichch commented 1 year ago

I think this may actually be a good extension to the Patch library. It could analyze the differences and generate JSON Patch documents that represent the transformation from one to the other.

I'm actually thinking the same but the other way around. 😃

I have a diff library that can produce JSON Patch document in RFC format but patching using such format is not yet support. This brought me here for alternatives.

gregsdennis commented 1 year ago

Someone contributed some code a while ago that can create a patch from two documents (and even two objects), but there was no intermediate diff, so I left this open.

JacobAtchley commented 1 month ago

seems like this is a common thing the community is trying to wrangle

we also made our own here

https://github.com/firebend/json-patch-generator