I am using JSON.NET and I want to convert from XML to JSON.
I am using JsonConvert.SerializeXNode(node) and I noticed that my json object has properties with @ in front of their names:
So for example: If I have:
<channel id="999" name="XXX" sid="8294" type="Digital TV" />
the JSON object is:
{ "@id": "999", @name="XXX" etc
Why am I getting "@" inserted in the JSON and is there a way I can avoid the "@" character being inserted?
I think thats just the way json.net works regarding the @ signs. You can always run a regex on the json string and replace them. Theres an example here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With