JsonPatchDocument
doesn't respect JsonSerializerOptions.PropertyNamingPolicy
#19
Labels
bug
Something isn't working
AFAIK, the only way to feed
JsonSerializerOptions
toJsonPatchDocument
is to pass them through constructor. However, when running methods of this object, e.g.Replace
, the resultingPath
property is written as it was passed, not converting it's string to a neededNamingPolicy
:The
patch.Operations[0].Path
s value is going to be/Name
in this example, as a property name, while expected to be/name
, as should be forced byJsonSerializerOptions
. The patch is applied anyways (due to #10 I guess?), but still would be nice to see appropriate values in requestsI understand, that json values usually don't need to be affected by
PropertyNamingPolicy
, but I think it should be respected in this case, sincePath
values are related to property names, when it comes to original jsonThe text was updated successfully, but these errors were encountered: