Monday, 29 September 2014

Converting JSON to XML doesn't work



I am trying to convert JSON to XML using newtonsoft, but because the left part contains a number and XML cannot have element that starts with a number the conversion fails


Example:



{
"PLC": {
"10": 7.6,
"9": 1.8,
"4": 11
}
}


is there anyway to safely convert it? or make it to add a "_" prefix for example to elements that starts with a number?


No comments:

Post a Comment