Skip to content

Instantly share code, notes, and snippets.

Created March 29, 2013 05:06
Show Gist options
  • Save anonymous/5268866 to your computer and use it in GitHub Desktop.
Save anonymous/5268866 to your computer and use it in GitHub Desktop.
protected override JsonResult Json(object data, string contentType, System.Text.Encoding contentEncoding, JsonRequestBehavior behavior)
{
var result = new NewtonSoftJsonResult();
result.Data = data;
result.ContentType = contentType;
result.ContentEncoding = contentEncoding;
result.JsonRequestBehavior = behavior;
return result;
}
protected override JsonResult Json(object data, string contentType, System.Text.Encoding contentEncoding)
{
return Json(data, contentType, contentEncoding, JsonRequestBehavior.DenyGet);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment