Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You can read this into a C# object with a single line of code using <a href="http://james.newtonking.com/json" rel="nofollow">JSON.Net</a>:</p> <pre><code>static void Main(string[] args) { var x = JsonConvert.DeserializeObject(JsonString); } private static string JsonString { get { return @"{""Results"":[{""Id"":""571611"",""ModerationStatus"":""APPROVED"",""LastModificationTime"": ""2011-10-31T05:36:33-05:00"" ,""IsRatingsOnly"":true,""TotalCommentCount"":0,""Rating"":5,""RatingRange"":5,""IsRecommended"":true,""TotalFeedbackCount"":0,""TotalPositiveFeedbackCount"":0,""TotalNegativeFeedbackCount"":0,""DisplayLocale"":""en_US"",""SubmissionTime"": ""2011-05-25T00:00:00-05:00"" ,""IsFeatured"":false,""LastModeratedTime"": ""2011-10-31T05:36:33-05:00"" ,""ProductId"":""3240234"",""AuthorId"":""z7knrbjunvi022pe4swqp18fra""},{""Id"":""571612"",""ModerationStatus"":""APPROVED"",""LastModificationTime"": ""2011-10-31T05:36:33-05:00"" ,""IsRatingsOnly"":true,""TotalCommentCount"":0,""Rating"":5,""RatingRange"":5,""IsRecommended"":true,""TotalFeedbackCount"":0,""TotalPositiveFeedbackCount"":0,""TotalNegativeFeedbackCount"":0,""DisplayLocale"":""en_US"",""SubmissionTime"": ""2011-05-25T00:00:00-05:00"" ,""IsFeatured"":false,""LastModeratedTime"": ""2011-10-31T05:36:33-05:00"" ,""ProductId"":""3240234"",""AuthorId"":""zsknvekklaxl56nzwliultz5mp""}],""Includes"":{""Products"":{""3240234"":{""Id"":""3240234"",""Name"":""Rosner Chevrolet"",""Description"":""Brevard County"",""BrandExternalId"":""01"",""Brand"":{""Id"":""01"",""Name"":""Personal Accounts""},""CategoryId"":""324"",""ProductPageUrl"":""https://www.sccu.com/personal/vehicle-loans/dealer-review.asp?did=234&amp;dealerName=Rosner+Chevrolet""}},""Authors"":{""z7knrbjunvi022pe4swqp18fra"":{""Id"":""z7knrbjunvi022pe4swqp18fra"",""ModerationStatus"":""NONE""},""zsknvekklaxl56nzwliultz5mp"":{""Id"":""zsknvekklaxl56nzwliultz5mp"",""ModerationStatus"":""NONE""}}},""HasErrors"":false,""Offset"":0,""Limit"":2,""TotalResults"":25}"; } } </code></pre> <p>The object will be an array of the outer JSON objects, if <strong>MyObject</strong> matches the JSON structure, then the following should work:</p> <pre><code>var myobj = JsonConvert.DeserializeObject&lt;MyObject&gt;(JsonString); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload