4 instantiations of ObjectWithJObject
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (4)
JsonPatchDocumentJObjectTest.cs (4)
18
var model = new
ObjectWithJObject
{ CustomData = (JsonObject)JsonSerializer.SerializeToNode(new { Emails = new[] { "foo@bar.com" } }) };
34
var model = new
ObjectWithJObject
{ CustomData = (JsonObject)JsonSerializer.SerializeToNode(new { Email = "foo@bar.com", Name = "Bar" }) };
48
var model = new
ObjectWithJObject
{ CustomData = new JsonObject([new("Email", "foo@bar.com"), new("Name", "Bar")]) };
65
var model = new
ObjectWithJObject
{ CustomData = new JsonObject([new("Email", "foo@bar.com")]) };
14 references to ObjectWithJObject
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (14)
JsonPatchDocumentJObjectTest.cs (14)
18
var
model = new ObjectWithJObject { CustomData = (JsonObject)JsonSerializer.SerializeToNode(new { Emails = new[] { "foo@bar.com" } }) };
19
var patch = new JsonPatchDocument<
ObjectWithJObject
>();
21
patch.Operations.Add(new Operation<
ObjectWithJObject
>("add", "/CustomData/Emails/-", null, "foo@baz.com"));
34
var
model = new ObjectWithJObject { CustomData = (JsonObject)JsonSerializer.SerializeToNode(new { Email = "foo@bar.com", Name = "Bar" }) };
35
var patch = new JsonPatchDocument<
ObjectWithJObject
>();
37
patch.Operations.Add(new Operation<
ObjectWithJObject
>("test", "/CustomData/Email", null, "foo@baz.com"));
38
patch.Operations.Add(new Operation<
ObjectWithJObject
>("add", "/CustomData/Name", null, "Bar Baz"));
48
var
model = new ObjectWithJObject { CustomData = new JsonObject([new("Email", "foo@bar.com"), new("Name", "Bar")]) };
49
var patch = new JsonPatchDocument<
ObjectWithJObject
>();
51
patch.Operations.Add(new Operation<
ObjectWithJObject
>("test", "/CustomData/Email", null, "foo@bar.com"));
52
patch.Operations.Add(new Operation<
ObjectWithJObject
>("add", "/CustomData/Name", null, "Bar Baz"));
65
var
model = new ObjectWithJObject { CustomData = new JsonObject([new("Email", "foo@bar.com")]) };
67
var patch = new JsonPatchDocument<
ObjectWithJObject
>();
68
patch.Operations.Add(new Operation<
ObjectWithJObject
>("copy", "/CustomData/UserName", "/CustomData/Email"));