File tree Expand file tree Collapse file tree 1 file changed +40
-6
lines changed Expand file tree Collapse file tree 1 file changed +40
-6
lines changed Original file line number Diff line number Diff line change @@ -20,30 +20,62 @@ High-performance, low-allocating JSON object diff and patch extension for System
20
20
21
21
## Install
22
22
23
- #### JsonDiffPatch
23
+ ### JsonDiffPatch
24
24
25
- ```
25
+ Using the Package Manager Console:
26
+
27
+ ``` powershell
26
28
PM> Install-Package SystemTextJson.JsonDiffPatch
27
29
```
28
30
29
- #### xUnit Assert
31
+ Using the dotnet CLI:
30
32
33
+ ``` batch
34
+ dotnet add package SystemTextJson.JsonDiffPatch
31
35
```
36
+
37
+ ### xUnit Assert
38
+
39
+ Using the Package Manager Console:
40
+
41
+ ``` powershell
32
42
PM> Install-Package SystemTextJson.JsonDiffPatch.Xunit
33
43
```
34
44
35
- #### MSTest v2 Assert
45
+ Using the dotnet CLI:
36
46
47
+ ``` batch
48
+ dotnet add package SystemTextJson.JsonDiffPatch.Xunit
37
49
```
50
+
51
+ ### MSTest v2 Assert
52
+
53
+ Using the Package Manager Console:
54
+
55
+ ``` powershell
38
56
PM> Install-Package SystemTextJson.JsonDiffPatch.MSTest
39
57
```
40
58
41
- #### NUnit Assert
59
+ Using the dotnet CLI:
42
60
61
+ ``` batch
62
+ dotnet add package SystemTextJson.JsonDiffPatch.MSTest
43
63
```
64
+
65
+ ### NUnit Assert
66
+
67
+ Using the Package Manager Console:
68
+
69
+ ``` powershell
44
70
PM> Install-Package SystemTextJson.JsonDiffPatch.NUnit
45
71
```
46
72
73
+ Using the dotnet CLI:
74
+
75
+ ``` batch
76
+ dotnet add package SystemTextJson.JsonDiffPatch.NUnit
77
+ ```
78
+
47
79
## Usage
48
80
49
81
### Diff
@@ -127,6 +159,7 @@ JsonDiffPatcher.DefaultComparison = JsonElementComparison.Semantic;
127
159
```
128
160
129
161
### Semantic Value Comparison
162
+
130
163
``` csharp
131
164
var node1 = JsonNode .Parse (" \" 2019-11-27\" " );
132
165
var node2 = JsonNode .Parse (" \" 2019-11-27T00:00:00.000\" " );
@@ -165,7 +198,8 @@ Assert.That(actual, JsonIs.NotEqualTo(expected));
165
198
```
166
199
167
200
Example output _ (when output is enabled)_ :
168
- ```
201
+
202
+ ``` csharp
169
203
JsonAssert .Equal () failure .
170
204
Expected :
171
205
{
You can’t perform that action at this time.
0 commit comments