aspnet / JsonPatch

[Archived] JSON PATCH library. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
103 stars 48 forks source link

Check if round tripping an operation's value is required #69

Closed kichalla closed 6 years ago

kichalla commented 7 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:

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

kichalla commented 7 years ago

A working change (in my private branch): https://github.com/aspnet/JsonPatch/commit/7f7ff71bc00f3fece41ce77e95d2937954baf63b

aspnet-hello commented 6 years ago

This issue was moved to aspnet/Home#2435