I am writing a small program that converts a generated XML (using the C# XmlSerializer) to a Json. The converting from XML to Json is done via Json.NET. I have not used Json at all and I am not sure that the generated code is correct. What I am concerned about is that all the properties of the exported objects have a '@' prefix. Is that normal for a Json code? For example converting this XML:
<Icon Name="name1" Path="public/images/name1.png" Size="50x50">
<IconCategories>
<string>misc</string>
</IconCategories>
</Icon>
is converted to:
{
"Icon":
{
"@Name": "name1",
"@Path": "public/images/name1.png",
"@Size": "50x50",
"IconCategories":
{
"string": "misc"
}
}
}
Is the '@Name' normal or should it be 'Name'? Using this online xml to json convert also yields similar results but with instead of the '@' symbol the '-' is used.