title: LibGDX: Reading from json file to ArrayList
body: <p>I need help with reading json file to ArrayList.</p>
  
  <p>I have json file:</p>
  
  <pre><code>[
      {
          "name": "Wall",
          "symbol": "#",      
      },
      {
          "name": "Floor",
          "symbol": ".",
      }
  ]
  </code></pre>
  
  <p>I have a class:</p>
  
  <pre><code>public class Tile {
  
      public String name;
      public String symbol;
  
  }
  </code></pre>
  
  <p>And I have another class with ArrayList:</p>
  
  <pre><code>public class Data {
  
      public static ArrayList&lt;Tile&gt; tilesData;
  
      public static void loadData() {
          tilesData = new ArrayList&lt;Tile&gt;();
          Json json = new Json();
          json.fromJson(Tile.class, Gdx.files.internal("data/tiles.json"));
      }
  
  }
  </code></pre>
  
  <p>I need to fill this ArrayList with data from json file, but I have some problems. I guess the line </p>
  
  <pre><code>json.fromJson(Tile.class, Gdx.files.internal("data/tiles.json"));
  </code></pre>
  
  <p>is wrong. </p>
  
  <p>When I try to run it there is </p>
  
  <pre><code>Exception in thread "LWJGL Application" com.badlogic.gdx.utils.SerializationException: Error reading file: data/tiles.json
  
  Caused by: com.badlogic.gdx.utils.SerializationException: Unable to convert value to required type: [
  {
      name: Wall,
      symbol: #
  },
  {
      name: Floor,
      symbol: .
  }
  </code></pre>
  
  <p>I have read the libgdx article about json files, but I found it unclear... I don't understand how to fill array. Please, help me with this case!</p>