KevinDockx / JsonPatch

JSON Patch (JsonPatchDocument) RFC 6902 implementation for .NET
MIT License
173 stars 29 forks source link

Using JsonPatch with TFS 2015 REST API #43

Closed bbusacker closed 8 years ago

bbusacker commented 8 years ago

Kevin,

I'm trying to use JsonPatch to do work item updates that use the the PATCH command. My problem is that Microsoft uses paths like /fields/System.Description for a property in the model class called just Description. I use the JsonProperty attribute class from the Newtonsoft.Json library to deserialize the class properly and that works but when I use the JsonPatch document it does not honor these values. Any thoughts?

Instead the path /fields/Description gets created which is not correct.

KevinDockx commented 8 years ago

Work in progress - component should honor JsonProperty attributes, will implement with IContractResolver.

KevinDockx commented 8 years ago

JsonProperty is now honoured when applying a patchdoc (cfr #44 ) - custom ContractResolver & honouring JsonProperty when working with a generic JsonPatchDocument are split up in #51 & #50