The JSON.NET framework can convert XML to JSON, but it uses the @ sign in the JSON as the attribute. I would rather remove this before sending it to the view. What would b
Another option is to create your own OneWayXmlNodeConverter inheriting from JsonConverter and call SerializeObject instead of SerializeXmlNode like this:
var json = JsonConvert.SerializeObject(xmlNode, new OneWayXmlNodeConverter());
I call it "One Way" because I assume the default XmlNodeConverter adds the "@" sign so it can convert back to XML from the resulting JSON.
If you include the JSON.NET source in your project (as opposed to just the compiled library), an easy way to create the OneWayXmlNodeConverter is to copy the XmlNodeConverter code, remove the hard-coded "@" sign in the private GetPropertyName method, and save it as OneWayXmlNodeConverter.
Note: I know that your question is specific to "replacing" the "@" sign, but the linked Preventing variation of this question is marked as duplicate.