I have a class with properties like this:
[JsonProperty("property_name")]
public string PropertyName { get; internal set; }
and I then use [JObject].ToObject<Class>()
to populate the properties on the class. This works fine in general, but some of the properties in the JObject
are several levels down. For example, they would be accessed via items.first_group.property
. However, if I try setting the JsonProperty
's PropertyName
to that, e.g.
[JsonProperty("monkeyOne.name")]
it simply doesn't set the value. Am I just doing something wrong, or is it really not possible to do this? And if not, is there a reason or has it just not been implemented?