Let's assume we have the following JSON:
{
"a": 10,
"b": "foo",
"c": 30,
"d": "bar",
}
and the C# class:
class Stuff
{
public int A { get; set; }
public string B { get; set; }
public JObject Others { get; set; }
}
Is there an easy way to make the deserialization of the JSON above populate members A
and B
with the values of a
and b
and put the values of c
and d
as JProperties in the Others
JObject?