Quantcast
Channel: ASP.NET MVC / Web API / Web Pages
Viewing all articles
Browse latest Browse all 7925

Commented Issue: Make JsonContractResolver a public class [228]

$
0
0
This would enable overriding the ResolvePropertyName method (see Newtonsoft.Json.Serialization.CamelCasePropertyNamesContractResolver) without having to reimplement the entire JsonContractResolver class. I would really like to keep its private property behavior.
Comments: Almost half day trying to understand how WebAPI serialize to JSON just because I want the first letter of JSON key lower case to standardize models in Javascript framework. At first I am stuck at Model Binder but after few hours I realize WebAPI uses MediaTypeFormatter to serialize/deserialize, then I found this. +1 to make it public, but it is really nice if camel case is applied in the JsonContractResolver by default.

Viewing all articles
Browse latest Browse all 7925

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>