0

Here's my JSON

  {
      "userReviewList": [{
              "userReviewId": "789021517",
              "body": "My shopping experience has bla bla bla",
              "date": "Apr 16, 2013",
              "name": "Djdannybhhhhh",
              "rating": 5,
              "title": "Awesome!",
              "voteCount": 0,
              "voteSum": 0,
              "viewUsersUserReviewsUrl": "https://xxxxxx.com/us/rexxxws?usxxxxileId=xxxxxx",
              "voteUrl": "https://xxxxxx.com/us/rexxxws?usxxxxileId=xxxxxx",
              "reportConcernUrl": "https://xxxxxx.com/us/rexxxws?usxxxxileId=xxxxxx",
              "reportConcernExplanation": "xxxxxxxxxxxxxxxxxxxxxxxxxx.",
              "customerType": "Customers",
              "reportConcernReasons": [{
                      "reasonId": "0",
                      "name": "Choose One"
                  }, {
                      "reasonId": "1",
                      "name": "This review contains offensive material"
                  }, {
                      "reasonId": "8",
                      "name": "This review is not a review or is off-topic"
                  }, {
                      "reasonId": "9",
                      "name": "I disagree with this review."
                  }, {
                      "reasonId": "7",
                      "name": "My concern isn't listed here."
                  }
              ]
          }, {
              "userReviewId": "780537396",
              "body": "xxxxxxxxxxxxxxxxxxxxxx",
              "date": "Apr 2, 2013",
              "name": "Majak6",
              "rating": 5,
              "title": "Smart!",
              "voteCount": 0,
              "voteSum": 0,
              "viewUsersUserReviewsUrl": "https://xxxxxx.com/us/rexxxws?usxxxxileId=xxxxxx",
              "voteUrl": "https://xxxxxx.com/us/rexxxws?usxxxxileId=xxxxxx",
              "reportConcernUrl": "https://xxxxxx.com/us/rexxxws?usxxxxileId=xxxxxx",
              "reportConcernExplanation": "xxxxxxxxxxxxxxxxxxxxxxxxxx",
              "customerType": "Customers",
              "reportConcernReasons": [{
                      "reasonId": "0",
                      "name": "Choose One"
                  }, {
                      "reasonId": "1",
                      "name": "This review contains offensive material"
                  }, {
                      "reasonId": "8",
                      "name": "This review is not a review or is off-topic"
                  }, {
                      "reasonId": "9",
                      "name": "I disagree with this review."
                  }, {
                      "reasonId": "7",
                      "name": "My concern isn't listed here."
                  }
              ]
          }
      ]
  }

I don't want to create separate class using json2csharp as I have already one class with specific properties I want to deserialize json to that class. That class has 'body', 'date', 'title', 'votecount' property (which are in json) & also some other properties are also in there, which are not in JSON. How can I do that in my Windows Store App using Newtonsoft Json library.

Farhan Ghumra
  • 15,180
  • 6
  • 50
  • 115
  • You can deserialize them to dynamic objects. – Nate Diamond May 30 '13 at 17:04
  • [Here's an example using Json.NET.](http://stackoverflow.com/questions/4535840/deserialize-json-object-into-dynamic-object-using-json-net) I think the built-in DataContract system can do dynamic objects as well. – Nate Diamond May 30 '13 at 17:46

0 Answers0