Return the root element instead of document node
This commit is contained in:
@@ -251,13 +251,13 @@ namespace umbraco
|
||||
json = "{\"arrayitem\":" + json + "}";
|
||||
}
|
||||
var xml = JsonConvert.DeserializeXmlNode(json, "json", false);
|
||||
return xml.CreateNavigator().Select("/");
|
||||
return xml.CreateNavigator().Select("/json");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
var xd = new XmlDocument();
|
||||
xd.LoadXml(string.Format("<error>Could not convert json to xml. Error: {0}</error>", ex));
|
||||
return xd.CreateNavigator().Select("/");
|
||||
return xd.CreateNavigator().Select("/error");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user