I have an appsettings.json file in my C# app. It contains field with names in upper case:
{
"FIELD_ONE": "foo",
"FIELD_TWO": "bar"
}
But I would like to bind it to class with camel-case naming style:
public class MySettings
{
public string FieldOne { get; set; }
public string FieldTwo { get; set; }
}
How can I bind this appsettings to MySettings instance?
FieldOne = config.GetValue<string>("FIELD_ONE")