Is it possible to return as SiteMap as a JsonResult?
- by Paul Suart
I've got a very simple Action on my Controller that's attempting to return my XmlSiteMap as a JsonResult:
public ActionResult Index()
{
var nodes = SiteMap.Provider.RootNode;
return new JsonResult() { Data = nodes, JsonRequestBehavior = JsonRequestBehavior.AllowGet };
}
However, when I call the Action, an InvalidOperationException is…