title: C# Newtonsoft deserialize JSON array
body: <p>I'm trying to deserialize an array using Newtonsoft so i can display files from a cloud based server in a listbox but i always end up getting this error no matter what i try: </p>
  
  <blockquote>
    <p>Newtonsoft.Json.JsonReaderException: 'Unexpected character encountered while parsing value: [. Path '[0].priv', line 4, position 15.'</p>
  </blockquote>
  
  <p>Thisis an example try to deserialize: </p>
  
  <pre><code>[
   {
    "code": 200,
    "priv": [
       {
          "file": "file.txt",
          "ext": "txt",
          "size": "104.86"
       },
       {
          "file": "file2.exe",
          "ext": "exe",
          "size": "173.74"
       },
  
    ],
    "pub": [
       {
          "file": "file.txt",
          "ext": "txt",
          "size": "104.86"
       },
       {
          "file": "file2.exe",
          "ext": "exe",
          "size": "173.74"
       }
    ]
   }
  ]
  </code></pre>
  
  <p>I tried using a C# Class like this:</p>
  
  <pre><code>    public class ListJson
  {
      [JsonProperty("pub")]
      public List List { get; set; }
  }
  
  public class List
  {
      [JsonProperty("file")]
      public string File { get; set; }
  
      [JsonProperty("ext")]
      public string Ext { get; set; }
  
      [JsonProperty("size")]
      public string Size { get; set; }
  }
      [JsonProperty("priv")]
  public List List { get; set; }
  }
  
  public class List
  {
      [JsonProperty("file")]
      public string File { get; set; }
  
      [JsonProperty("ext")]
      public string Ext { get; set; }
  
      [JsonProperty("size")]
      public string Size { get; set; }
  }
  </code></pre>
  
  <p>And deserialize with: </p>
  
  <pre><code>List&lt;list&gt; fetch = Newtonsoft.Json.JsonConvert.DeserializeObject&lt;List&lt;list&gt;&gt;(json);
  </code></pre>