title: Trying to parse a JSON array in Unity C# but it returns null
body: <p>Here is my JSON file:</p>
  
  <pre><code>[
    {
      "name": "An item"
    }
   ]
  </code></pre>
  
  <p>Here is my helper class:</p>
  
  <pre><code>public static class JsonHelper
      {
          public static T[] FromJson&lt;T&gt;(string json)
          {
              string newJson = "{ \"array\": " + json + "}";
              Wrapper&lt;T&gt; wrapper = JsonUtility.FromJson&lt;Wrapper&lt;T&gt;&gt;(newJson);
              return wrapper.array;
          }
  
          [System.Serializable]
          private class Wrapper&lt;T&gt;
          {
              public T[] array;
          }
      }
  </code></pre>
  
  <p>Here is the class I am trying to make objects out of:</p>
  
  <pre><code>public class Item
  {   
      public string name, desc;
  }
  </code></pre>
  
  <p>This is where I am calling the helper class:</p>
  
  <pre><code>Item[] itemList = JsonHelper.FromJson&lt;Item&gt;(itemJson.text);
  </code></pre>
  
  <p>The problem is <code>itemList</code> and <code>wrapper.array</code> in <code>JsonHelper</code> is <code>null</code>.</p>
  
  <p>I copied code directly from:</p>
  
  <p><a href="http://www.boxheadproductions.com.au/deserializing-top-level-arrays-in-json-with-unity/" rel="nofollow noreferrer">http://www.boxheadproductions.com.au/deserializing-top-level-arrays-in-json-with-unity/</a></p>
  
  <p>and</p>
  
  <p><a href="https://forum.unity.com/threads/how-to-load-an-array-with-jsonutility.375735/" rel="nofollow noreferrer">https://forum.unity.com/threads/how-to-load-an-array-with-jsonutility.375735/</a></p>
  
  <p>What am I doing wrong?</p>