public class Foo {
[JsonProperty("bar-baz")]
[DataMember(Name="bar_baz")]
[XmlAttribute(AttributeName="barBaz")]
public string BarBaz {get; set;}
}
var f = new Foo();
var a = TypeAccessor.Create(typeof(Foo));
a[f, "bar-baz"]
a[f, "barBaz"]
a[f, "bar_baz"]
Scenarios in which the property is requested using one of the serialised names will fail with an exception. (The mooted IsDefined(name) method would help here
It would be desirable if the accessor supports the serialised versions of property names.
Super contrived example:
Scenarios in which the property is requested using one of the serialised names will fail with an exception. (The mooted IsDefined(name) method would help here
It would be desirable if the accessor supports the serialised versions of property names.