I've been reading about Preventing the Execution of Unauthorized Script in JSON, and i want to use this practice.
The problem is that i don't know how can i do this.
My json result is like this
return Json(new { elements = elements }, JsonRequestBehavior.AllowGet);
I tryied
return Json(new { "while(1);", elements = elements }, JsonRequestBehavior.AllowGet);
and it doesn't work.
How can i do this?