Is there a way to pass JsonSerializerSettings to JsonPatchDocument?

44 views Asked by At

Looks like, JsonPatchDocument's ApplyTo takes the serialization settings from JsonConvert.DefaultSettings. There should be a way to pass custome JsonSerializerSettings to th library so ApplyTo can user specific settings such as customized JsonConverters.

Is there a way to do so?

CurrentSolution:

JsonConvert.DefaultSettings = () => JsonSerializerSettings;
patchDoc.ApplyTo(obj);

Ideally I shouldn't need to override the global serializer settings. Is there a way to do so?

0

There are 0 answers