Closed kichalla closed 6 years ago
We currently round trip the 'value' provided in an 'operation' here: https://github.com/aspnet/JsonPatch/blob/dev/src/Microsoft.AspNetCore.JsonPatch/Internal/ConversionResultProvider.cs#L15
Valid types in JSON: number, string, bool, array, object, null
Some things we need to verify in the above line of code:
JArray
JObject
ToObject
Some scenarios to consider if we plan to avoid round tripping: value type: string target type: System.Guid
value type: Int64 (default json.net type for integers) target type: Int32
@Eilon
A working change (in my private branch): https://github.com/aspnet/JsonPatch/commit/7f7ff71bc00f3fece41ce77e95d2937954baf63b
This issue was moved to aspnet/Home#2435
We currently round trip the 'value' provided in an 'operation' here: https://github.com/aspnet/JsonPatch/blob/dev/src/Microsoft.AspNetCore.JsonPatch/Internal/ConversionResultProvider.cs#L15
Valid types in JSON: number, string, bool, array, object, null
Some things we need to verify in the above line of code:
JArray
orJObject
, then we could use theToObject
on them: http://www.newtonsoft.com/json/help/html/M_Newtonsoft_Json_Linq_JToken_ToObject.htmSome scenarios to consider if we plan to avoid round tripping: value type: string target type: System.Guid
value type: Int64 (default json.net type for integers) target type: Int32
@Eilon