Skip to content

Instantly share code, notes, and snippets.

@simon-lang
Created June 29, 2012 02:40
Show Gist options
  • Select an option

  • Save simon-lang/3015331 to your computer and use it in GitHub Desktop.

Select an option

Save simon-lang/3015331 to your computer and use it in GitHub Desktop.
C# dynamic json response
dynamic response;
response = new {
success = false,
message = "No spaces available, sorry.",
spacesAvailable = TrainingEvent.SpacesAvailable
};
var jss = new JavaScriptSerializer();
Response.Write(jss.Serialize(response));
Response.End();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment