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
I've got the following inputs and I'm using the JSON Delta formatter:
{
person = new
{
name = "John Doe",
dob = DateTime.Now
},
addresses = new List<string>() { "address 1", "address 2" }
};
dynamic newObject = new
{
person = new
{
name = "Patrick",
},
addresses = new List<string>() { "address 1", "address 3" }
};
I've got the following inputs and I'm using the JSON Delta formatter:
The response is:
{"path":"/person/dob","op":"remove","from":null,"value":null}
If I were using the default formatter, I would have for the dob field something like that:
I would expect to be able to have the previous value in the JSON Patch response too.
I'm creating my own formatter inheriting from the JsonDeltaFormatter class and overriding this method:
jsondiffpatch.net/Src/JsonDiffPatchDotNet/Formatters/JsonPatch/JsonDeltaFormatter.cs
Line 18 in d0abb0e
More specifically this line, that only takes the context into account, without the delta:
jsondiffpatch.net/Src/JsonDiffPatchDotNet/Formatters/JsonPatch/JsonDeltaFormatter.cs
Line 35 in d0abb0e
However, if this is not working as designed I'd rather open a PR.
The text was updated successfully, but these errors were encountered: