How can I convert a generic JObject to camelCase plain json string? I\'ve tried with JsonSerializerSettings but doesn\'t work (Newtonsoft.Json 4.5.11)
[Test]
This question starts from a JObject and wants to work to a camel-cased JSON object. If you are actually starting from an object and want to get to a JObject that is already camelcased, then you can do this:
var serializer = new JsonSerializer()
{
ContractResolver = new CamelCasePropertyNamesContractResolver()
};
var jo = JObject.FromObject(someDataContract, serializer);
The resulting 'jo' will be camelcased.