algesten / jsondiff

Structural JSON diff/patch tool.
Other
66 stars 27 forks source link

Provide a pluggable way to ignore certain diffs #18

Closed nachogmd closed 10 years ago

nachogmd commented 10 years ago

In some circumstances it would be very nice to be able to avoid diffs which aren't semantically true. Let's think of an association to an object with an synthetic id key. This association could semantically be the same but sintactically not. Lets imagine the following two objects:

{ assoc: {id : 1} }

{ assoc: {id : 1, name: "myassoc"} }

In many occasions we don't want to produce a diff here.

This could be acheived by providing a Visitor interface for all monitored changes.