Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "2010": [
- {
- "type": "vacation",
- "alloc": "90.00"
- },
- {
- "year": [],
- "2010": [
- {
- "type": "vacation",
- "alloc": "0.00"
- },
- static void Main(string[] args) {
- var json = @"
- {
- '2010': [
- {
- 'type': 'vacation',
- 'alloc': '90.00'
- },
- {
- 'type': 'something',
- 'alloc': '80.00'
- }
- ]}";
- var jss = new JavaScriptSerializer();
- var obj = jss.Deserialize<dynamic>(json);
- Console.WriteLine(obj["2010"][0]["type"]);
- Console.Read();
- }
Add Comment
Please, Sign In to add comment