Skip to content

Instantly share code, notes, and snippets.

@joeriks
Created June 12, 2011 13:31
Show Gist options
  • Save joeriks/1021552 to your computer and use it in GitHub Desktop.
Save joeriks/1021552 to your computer and use it in GitHub Desktop.
Sample JSon array with c# anonymous objects (Webmatrix)
@{
var arry = new[] {
new {
id=Guid.NewGuid(),
name="one",
done=false
},
new {
id=Guid.NewGuid(),
name="two",
done=true
}
};
Json.Write(arry, Response.Output);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment