WebApi CamelCase

Camelcase Mar 11, 2013

While WebApi is easy to pick up and start working, the conention between C# of using Pascal Case vs using camelCase in Javascript drives me crazy, Fortunately there is a simple fix for this, all you have to do is put his in the Global.asax, this user Library.

var index = config.Formatters.IndexOf(config.Formatters.JsonFormatter);
            config.Formatters[index] = new JsonMediaTypeFormatter
                                               SerializerSettings = new JsonSerializerSettings
                                                                            ContractResolver =
                                                                                new CamelCasePropertyNamesContractResolver

If you are using pre MVC4 then should help