title: Collecting hashes into OpenStruct creates "table" entry
body: <p>Why this (evaluated in Rails console)</p>
  
  <pre><code>[{:a =&gt; :b}].collect {|x| OpenStruct.new(x)}.to_json
  </code></pre>
  
  <p>adds a "table" record in there?</p>
  
  <pre><code>"[{\"table\":{\"a\":\"b\"}}]
  </code></pre>
  
  <p>I want just this:</p>
  
  <pre><code>"[{\"a\":\"b\"}]
  </code></pre>
  
  <p>Does it mean that Rails' to_json method handles OpenStruct in a different way? When I try it in the irb, it's not there:</p>
  
  <pre><code>require 'ostruct'
  [{:a =&gt; :b}].collect {|x| OpenStruct.new(x)}.inspect
  </code></pre>