I have a simple JSON:
{
"id": 123,
"name": "BaseName",
"variation": { "name": "VariationName" }
}
Is there an easy way to map it to JSON.NET deserialization:
class Product
{
public int Id { get; set; }
public string Name { get; set; }
public string VariationName { get; set; }
}
Maybe I can do this with a custom converter, but I was hoping it would be easier by annotating a class with attributes that would give instructions for deserializing the change object using only one property.
source
share