You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+56-82Lines changed: 56 additions & 82 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,15 +5,14 @@ High-performance, low-allocating JSON objects diff and patch extension for `Syst
5
5
## Features
6
6
7
7
- Use [jsondiffpatch](https://github.com/benjamine/jsondiffpatch) delta format described [here](https://github.com/benjamine/jsondiffpatch/blob/master/docs/deltas.md)
8
-
- Target `.NET Standard 2.0` and leverage latest .NET features
9
-
- Similar diff experience as [jsondiffpatch.net](https://github.com/wbish/jsondiffpatch.net) (based on Newtonsoft.Json)
8
+
- Target latest `.NET Standard` and `.NET Framework 4.6.1` (for legacy apps) and leverage latest .NET features
9
+
- Alternative to [jsondiffpatch.net](https://github.com/wbish/jsondiffpatch.net) which is based on `Newtonsoft.Json`
10
+
- Support generating patch document in RFC 6902 JSON Patch format
10
11
- Fast large JSON document diffing with less memory consumption
11
12
- Support smart array diffing (e.g. move detect) using LCS and custom array item matcher
12
-
- Support diffing long text using [google-diff-match-patch](http://code.google.com/p/google-diff-match-patch/), or write your own diff algorithm
13
+
-_(Only when not using RFC 6902 format)_Support diffing long text using [google-diff-match-patch](http://code.google.com/p/google-diff-match-patch/), or write your own diff algorithm
13
14
-`JsonNode.DeepClone` and `JsonNode.DeepEquals` methods
14
15
15
-
- (_Under development_) formatters etc
16
-
17
16
# Install
18
17
19
18
Install from [NuGet.org](https://www.nuget.org/packages/SystemTextJson.JsonDiffPatch/):
/// Gets or sets whether to prefer <seecref="ArrayObjectItemKeyFinder"/> and
110
-
/// <seecref="ArrayObjectItemMatchByPosition"/> than using deep value comparison
111
-
/// to match array object items. By settings this property to <c>true</c>,
112
-
/// a diff could be returned faster but larger in size. Default value is <c>false</c>.
113
-
/// </summary>
114
-
publicboolPreferFuzzyArrayItemMatch { get; set; }
115
-
116
-
/// <summary>
117
-
/// Gets or sets the minimum length for diffing texts using <seecref="TextMatcher"/>
118
-
/// or default text diffing algorithm, aka Google's diff-match-patch algorithm. When text
119
-
/// diffing algorithm is not used, text diffing is fallback to value replacement. If this
120
-
/// property is set to <c>0</c>, diffing algorithm is disabled. Default value is <c>0</c>.
121
-
/// </summary>
122
-
publicintTextDiffMinLength { get; set; }
123
-
124
-
/// <summary>
125
-
/// Gets or sets the function to match long texts.
126
-
/// </summary>
127
-
publicTextMatch? TextMatcher { get; set; }
128
-
}
129
-
```
77
+
Benchmarks were generated using example objects [here](https://github.com/weichch/system-text-json-jsondiffpatch/tree/main/test/Examples) and benchmark tests [here](https://github.com/weichch/system-text-json-jsondiffpatch/tree/main/test/SystemTextJson.JsonDiffPatch.Benchmark/).
_\* Generated using example objects [here](https://github.com/weichch/system-text-json-jsondiffpatch/tree/main/test/Examples) and benchmark tests [here](https://github.com/weichch/system-text-json-jsondiffpatch/tree/main/test/SystemTextJson.JsonDiffPatch.Benchmark/SimpleDiffBenchmark.cs)_
91
+
| Method | Mean | Min | Max | P95 | P80 | Allocated |
0 commit comments