We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider the following two sorted arrays:
Left: [1,2,3,4,5,6,7,8,9] Right: [1,3,4,6,8]
[1,2,3,4,5,6,7,8,9]
[1,3,4,6,8]
Under the reference (JS) implementation we get an efficent output:
{ "_t": "a", "_1": [ 2, 0, 0 ], "_4": [ 5, 0, 0 ], "_6": [ 7, 0, 0 ], "_8": [ 9, 0, 0 ] }
telling us clearly that items at indexes 1, 4, 6 & 8 (i.e. values 2, 5, 7 & 9) have been removed.
Under jsondiffpatch.net
void Main() { var leftArray = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, }; var rightArray = new int[] { 1, 3, 4, 6, 8 }; var jdp = new JsonDiffPatch(); var output = jdp.Diff(JToken.FromObject(leftArray), JToken.FromObject(rightArray)); Console.Out.WriteLine(output.ToString()); }
We get the following output:
{ "_t": "a", "_1": [ 2, 0, 0 ], "_2": [ 3, 0, 0 ], "_3": [ 4, 0, 0 ], "_4": [ 5, 0, 0 ], "_5": [ 6, 0, 0 ], "_6": [ 7, 0, 0 ], "_7": [ 8, 0, 0 ], "_8": [ 9, 0, 0 ], "1": [ 3 ], "2": [ 4 ], "3": [ 6 ], "4": [ 8 ] }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Consider the following two sorted arrays:
Left:
[1,2,3,4,5,6,7,8,9]
Right:
[1,3,4,6,8]
Under the reference (JS) implementation we get an efficent output:
telling us clearly that items at indexes 1, 4, 6 & 8 (i.e. values 2, 5, 7 & 9) have been removed.
Under jsondiffpatch.net
We get the following output:
The text was updated successfully, but these errors were encountered: