title: Convert JSON array objects to .net Classes
body: <p>I am having issues with the below JSON String on converting it to .net class. The class that I have created so far is below as well. The particular section that I cannot get to work is group_access and roles tags. I know these are an array of objects but when I try to convert the objects i get the following error; Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Array' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.</p>
  
  <p>I also tried using visual studio tool (Edit>Paste Special > JSON) and jscon2csharp.com it errors out on converting the roles and group_access tags.</p>
  
  <p>JSON data:</p>
  
  <pre><code>    {
      id: 122404,
      email: 'mike@email.com',
      fname: 'Mike',
      lname: 'Doe',
      full_name: 'Mike Doe',
      resource_id: '001002',
      title: '',
      last_login: '2016-11-01 09:15:23',
      tags: [
      'Math Department', 'New Teachers'
      ],
      grades: [
      4, 5, 6
      ],
      targets: [
      'Option 1: 3 Informal Obs.'
      ],
      caseload_tags: [],
      group_access: [
      10: 2
      25527: 1
      25645: 1
      25653: 4
      ],
      roles: [
      10: [
          2015: 2,
          2016: 2
      ],
      25527: [
          2015: 2,
          2016: 1
      ]
      25645: [
          2015: 1,
          2016: 1
      ]
      25653: [
          2015: 3,
          2016: 4
      ]
      ]
      }
  </code></pre>
  
  <p>My code:</p>
  
  <pre class="lang-vb prettyprint-override"><code>    Public Class Item
        Public Property id As Integer
        Public Property email As String
        Public Property fname As String
        Public Property lname As String
        Public Property full_name As String
        Public Property resource_id As String
        Public Property title As String
        Public Property tags As IList(Of String)
        Public Property grades As IList(Of String)
        Public Property targets As IList(Of String)
        Public Property group_access As Array
        Public Property roles As Array
      End Class
  
      Public Class RootObject
        Public Property type As String
        Public Property limit As Integer
        Public Property offset As Integer
        Public Property total As Integer
        Public Property time As String
        Public Property items As List(Of Item)
        Public Property items_count As Integer 
      End Class
  </code></pre>