0

这是我的 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."
                  }
              ]
          }
      ]
  }

我不想使用 json2csharp 创建单独的类,因为我已经有一个具有特定属性的类,我想将 json 反序列化为该类。该类具有“body”、“date”、“title”、“votecount”属性(在 json 中)以及其他一些属性也在其中,它们不在 JSON 中。如何使用 Newtonsoft Json 库在我的 Windows 应用商店应用程序中做到这一点。

4

0 回答 0