Russian_Dragon
Russian_Dragon

Reputation: 11

odata and CamelCase

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

Answers (1)

Tan Jinfu
Tan Jinfu

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

Related Questions