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
{{ message }}
This repository was archived by the owner on Nov 15, 2018. It is now read-only.
An issue was logged on the issue list of Marvin.JsonPatch (on which AspNetCore.JsonPatch is based, which is why I'm logging this issue) regarding honoring JSON.NET's JsonProperty (KevinDockx/JsonPatch#44 (comment)).
The AspNetCore version supports this when applying a patchDoc to a class that has properties decorated with [JsonProperty] attributes. Marvin.JsonPatch doesn't (PCL stuff), so that's not an issue for AspNetCore's version. But it's the last comment of Amnesia1187 that's of importance, as it affects AspNetCore.JsonPatch.
It's regarding creating a JsonPatchDocument on the consumer-side of things. Such a document is serialized to a Json list of operations, and the "path"-portion contains the property name the patch operation affects. That part apparently does not respect JsonProperty values.
So, if you create a JsonPatchDocument, and MyClass contains a property "Name" decorated with JsonProperty("RealName"), it will be serialized to path: "/name" instead of "realName".
I feel it should serialize to realName. Thoughts on this?