Skip to content

Instantly share code, notes, and snippets.

@thunsaker
Created August 16, 2012 03:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thunsaker/3366339 to your computer and use it in GitHub Desktop.
Save thunsaker/3366339 to your computer and use it in GitHub Desktop.
Return Raw JSON with ActionResult
// GET: /Monkey/Get/5
/// <summary>Return Raw JSON</summary>
public ActionResult Get(int id) {
return Json(
new {
Id = id,
Name = "George",
ScientificName = "Simia Curiosa",
Active = "true",
DateCreated = "1343404556"
},
JsonRequestBehavior.AllowGet);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment