I am using a REST API from C# with Newtonsoft.Json. The responses include an extra, useless level.
The JSON looks like:
{
'name': 'John Doe',
'aliases': {
'member': [
'Lil Johnny',
'John Boy'
]
}
}
and I want to deserialize into something like:
class Person
{
public string Name { get; set; }
public string[] Aliases { get; set; }
}
I'm hoping there's some JsonProperty
directive I can use to decorate Aliases
to get the deserializer to discard "member" level of the Json but I can't find it.