Reputation: 11
Faced with the problem of OData get JSON accordingly style Model EF.
{
Name: "..",
Number: 123
}
According to information on the Internet set CamelCase in WebAPI do line
config.Formatters.JsonFormatter.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();
In OData line not worked.
How in OData set in return JSON CamelCase? OR How in Client convert complex JSON в JSON with field CamelСase?
Upvotes: 0
Views: 1613
Reputation: 3345
OData itself supports CamelCase, and this sample may help you:http://aspnet.codeplex.com/SourceControl/latest#Samples/WebApi/OData/v4/ODataCamelCaseSample/
Upvotes: 1