I am using Newtonsoft.Json.Net40. When I covert the following XDocument to Json the succeeding Json is returned.
< lsems-Response version="1.0.0" >
< lsems-Status statusCode="000" statusText="Success" >Store Data Request accepted.< /lsems-Status >
< lsems-StoreDataResponse >< /lsems-StoreDataResponse >
< / lsems-Response >
{"?xml":
{"@version":"1.0","@encoding":"UTF-8"},
"lsems-Response":
{
"@version":"1.0.0","lsems-Status":
{"@statusCode":"000","@statusText":"Success","#text":"Store Data Request accepted."},
"lsems-StoreDataResponse":""
}
}
Here is my code:
Public Sub ConvertXDocToJson()
jsonOut = JsonConvert.SerializeObject(xmlOut)
End Sub
jsonOut is filled with the above json.
How do I remove the @ and # before each attribute?
No comments:
Post a Comment