using Newtonsoft.Json.Serialization;
public static void Main()
var foo = new Foo { KibanaIndex = "whatever", AnotherProperty = "whatever" };
var resolver = new CamelCasePropertyNamesContractResolver();
resolver.NamingStrategy.OverrideSpecifiedNames = false;
var settings = new JsonSerializerSettings { ContractResolver = resolver };
var json = JsonConvert.SerializeObject(foo, settings);
[JsonProperty(PropertyName = "KIBANA_INDEX")]
public string KibanaIndex { get; set; }
public string AnotherProperty { get; set; }