title: How to specify the data types for JSON parsing?
body: <p>I have a JSON response which is an Array of Hash:</p>
  
  <pre><code>[{"project" =&gt; {"id" =&gt; 1, "name" =&gt; "Internal"},
   {"project" =&gt; {"id" =&gt; 2, "name" =&gt; "External"}}]
  </code></pre>
  
  <p>My code looks like this:</p>
  
  <pre><code>client = HTTP::Client.new(url, ssl: true)
  response = client.get("/projects", ssl: true)
  projects = JSON.parse(response.body) as Array
  </code></pre>
  
  <p>This gives me an Array but it seems I need to typecast the elements to actually use them otherwise I get <code>undefined method '[]' for Nil (compile-time type is (Nil | String | Int64 | Float64 | Bool | Hash(String, JSON::Type) | Array(JSON::Type)))</code>.</p>
  
  <p>I tried <code>as Array(Hash)</code> but this gives me <code>can't use Hash(K, V) as generic type argument yet, use a more specific type</code>.</p>
  
  <p>How do I specify the type?</p>