Skip to content

Instantly share code, notes, and snippets.

@mgroves
Created January 17, 2014 16:21
Show Gist options
  • Select an option

  • Save mgroves/8476272 to your computer and use it in GitHub Desktop.

Select an option

Save mgroves/8476272 to your computer and use it in GitHub Desktop.
public class Friend
{
public string name { get; set; }
public string occupation { get; set; }
}
public class Enemy
{
public string name { get; set; }
public string characteristics { get; set; }
public int? numEyes { get; set; }
}
public class RootObject
{
public string name { get; set; }
public string occupation { get; set; }
public List<Friend> friends { get; set; }
public List<Enemy> enemies { get; set; }
}
{
"name": "Tim",
"occupation": "enchanter",
"friends": [
{"name": "Arthur", "occupation": "king" },
{"name": "Sir Robin", "occupation": "knight" }
],
"enemies": [
{ "name": "rabbit", "characteristics": "vicious streak" },
{ "name": "Black Beast of Aaaaarrrrrrggghhh", "numEyes": 24 }
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment