Hi I hope someone can help me, I want to generate json from a node with children doctype event with a surface controller and i Get Circle reference because in my doctype event I have a List with another doctype Facts . I have tried to create a dto but I don't now how to populate it If someone can point me in right direction. Many Thanks in advance Christina
public JsonResult GetCalendarData()
{
var allevents = Umbraco.Content(1067).Children();
var eventList = from l in allevents
select new
{
start = l.Value<DateTime>("eventStartDate").ToString(),
title = l.Name,
description = l.Value("ingress").ToString() ?? "",
programs = l.Value("programs") // IEnumerable<Facts> -> time, text
};
var events = eventList.ToArray();
return new JsonResult { Data = events, JsonRequestBehavior = JsonRequestBehavior.AllowGet };
}
Circle reference error serialize object to json
Hi I hope someone can help me, I want to generate json from a node with children doctype event with a surface controller and i Get Circle reference because in my doctype event I have a List with another doctype Facts . I have tried to create a dto but I don't now how to populate it If someone can point me in right direction. Many Thanks in advance Christina
is working on a reply...