c#using Newtonsoft.Json;using Newtonsoft.Json.Serialization;var settings = new JsonSerializerSettings{ ContractResolver = new CamelCasePropertyNamesContractResolver(), Formatting = Formatting.Indented };var obj = new{ FirstName = "John", LastName = "Doe"};string json = JsonConvert.SerializeObject(obj, settings);Console.WriteLine(json);