CamelCaseJsonFormatterSample.Global.Application_Start C# (CSharp) Method

Application_Start() protected method

protected Application_Start ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        protected void Application_Start(object sender, EventArgs e) {
            var config = GlobalConfiguration.Configuration;
            config.Formatters.JsonFormatter.SerializerSettings =
                new JsonSerializerSettings() {
                    ContractResolver = new CamelCasePropertyNamesContractResolver()
                };

            RouteConfig.RegisterRoutes(RouteTable.Routes);
        }
    }