I have a mongo dataset containing objects where the property name cases differ. e.g.
{
"prop1": "value1",
"prop2": "value2"
},
{
"Prop1": "value3",
"proP2": "value4"
},
{
"PROP1": "value5",
"ProP2": "value6"
}
Is there a way I can map this into my class.
public class MyClass
{
public string Prop1 { get; set; }
public string Prop2 { get; set; }
}
I can see you can use the BsonDiscriminator attribute to specify a particular casing but can I handle multiple casings somehow?