Let's say I have a Json object that looks like this:
{
"Phones": [
{
"Phone": {
"Value": 123,
"@Type": "Foo"
}
}
]
}
I want to call JsonConvert.DeserializeXmlNode() but would like the resulting XML to look like this:
<Phones>
<Phone Type="Foo">123</Phone>
</Phones>
Currently Value is being deserialized to an xml element as a child of Phone, but I want it to be the XML value of Phone. Is there a way to do this using Json.Net, like a special operator that tells it to deserialize it as such, without having to create a custom serializer? Any help is apppreciated.