I am trying to display JSON that looks like
"ids": {
"id": {
"@value":"6763754764235874140"
}
}
And I would like to map it to a couple of classes that look like
class Property
{
public Ids Ids { get; set; }
}
class Ids
{
public string Id { get; set; }
}
So basically I want to write the value ids/id/@valuefrom the JSON document to Ids.Idin the class architecture. From looking at the documentation, I thought I could use something like
[JsonProperty(ItemConverterType=typeof(IdConverter))]
public string Id { get; set; }
and provide a custom subclass JsonConverternamed IdConverter. However, when I do this, mine IdConverter.ReadJsonwill never be called. What am I doing wrong?
source
share