There is some method of converting a JSON object to an XML object using
There is some method of converting a JSON object to an XML object using
I was able to do the conversion by creating this method that worked well:
function jsonToXML(obj:Object):XML {
var to:XML = new XML(<root></root>);
ad(to, obj);
function ad(c:*, b:*):void {
for(var a:Object in b) {
if(b[a].toString() == "[object Object]") {
c.appendChild(<{a}></{a}>);
ad(c[a], b[a]);
}
else {
c.appendChild(<{a}>{b[a]}</{a}>);
}
}
}
return to;
}