CamelCasePropertyNamesContractResolver uses a shared contract cache across all instances but it doesn't consider the fact that sometimes different instances use different naming strategies. https://github.com/JamesNK/Newtonsoft.Json/issues/2927
In our case, we were using CamelCasePropertyNamesContractResolver in our ASP.NET app and then added Elsa Workflow which was using the same resolver with another naming strategy and broke our existing code. It is now fixed in Elsa Workflow (with this PR https://github.com/elsa-workflows/elsa-core/pull/4521) but it took us a long time to understand what was wrong.
CamelCasePropertyNamesContractResolver
uses a shared contract cache across all instances but it doesn't consider the fact that sometimes different instances use different naming strategies. https://github.com/JamesNK/Newtonsoft.Json/issues/2927In our case, we were using
CamelCasePropertyNamesContractResolver
in our ASP.NET app and then added Elsa Workflow which was using the same resolver with another naming strategy and broke our existing code. It is now fixed in Elsa Workflow (with this PR https://github.com/elsa-workflows/elsa-core/pull/4521) but it took us a long time to understand what was wrong.