Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><a href="http://json2csharp.com/" rel="noreferrer">Here</a> is a link to a fantastic tool that maps Json to C#, here is what your mapping should look like:</p> <pre><code>public class Task { public object id { get; set; } public string name { get; set; } public string code { get; set; } public int level { get; set; } public string status { get; set; } public object start { get; set; } public int duration { get; set; } public object end { get; set; } public bool startIsMilestone { get; set; } public bool endIsMilestone { get; set; } public bool collapsed { get; set; } public List&lt;object&gt; assigs { get; set; } } public class Resource { public string id { get; set; } public string name { get; set; } } public class Role { public string id { get; set; } public string name { get; set; } } public class RootObject { public List&lt;Task&gt; tasks { get; set; } public int selectedRow { get; set; } public List&lt;object&gt; deletedTaskIds { get; set; } public List&lt;Resource&gt; resources { get; set; } public List&lt;Role&gt; roles { get; set; } public bool canWrite { get; set; } public bool canWriteOnParent { get; set; } } </code></pre> <p>There is also another slick way of mapping json to C# (I believe it comes with Visual Studio 2012 -> Web Essentials), you can go <code>Edit</code>-> <code>Paste Special</code>-> <code>Paste JSON as Classes</code></p> <p><strong>EDIT</strong></p> <p>Since you've asked using <a href="http://james.newtonking.com/pages/json-net.aspx" rel="noreferrer">Json.NET</a> (you can get it from <a href="http://www.nuget.org/packages/newtonsoft.json/" rel="noreferrer">NuGet</a>) you can deserialize your json like this:</p> <pre><code>RootObject deserialized = JsonConvert.DeserializeObject&lt;RootObject&gt;(data); </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