Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I am pretty sure if you created a class with one property called project and that was a List and deserialized to that object, that everything would just work.</p> <pre><code>//Using a page "test.aspx" in my existing project (I already had it open) using System; using System.Collections.Generic; using Newtonsoft.Json; public partial class test : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { string s = "{\"project\":[{\"name\":\"GCUK\",\"id\":\"project11\",\"href\":\"/httpAuth/app/rest/projects/id:project11\"},{\"name\":\"Interiors In Spain\",\"id\":\"project3\",\"href\":\"/httpAuth/app/rest/projects/id:project3\"}]}"; var p = JsonConvert.DeserializeObject&lt;TCProjectWrapper&gt;( s ); s = "this"; //for easy breakpointing } } [JsonObject( MemberSerialization.OptIn )] public class TCProjectWrapper { [JsonProperty( PropertyName = "project" )] private List&lt;TCProject&gt; Project { get; set; } } [JsonObject( MemberSerialization.OptIn )] public class TCProject { public override string ToString() { return Name; } [JsonProperty( PropertyName = "archived" )] public bool Archived { get; set; } [JsonProperty( PropertyName = "description" )] public string Description { get; set; } [JsonProperty( PropertyName = "href" )] public string Href { get; set; } [JsonProperty( PropertyName = "id" )] public string Id { get; set; } [JsonProperty( PropertyName = "name" )] public string Name { get; set; } [JsonProperty( PropertyName = "webUrl" )] public string WebUrl { get; set; } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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