title: MognoDB: JSON util is deprecated
body: <p>Up to now, I've been using this code in order to create a <code>DBObject</code> from a json string:</p>
  
  <pre><code>DBObject metadataObject = (DBObject)JSON.parse(jsonString);
  </code></pre>
  
  <p>However, <code>com.mongodb.util.JSON</code> is deprecated, and it's recomended to use <code>BasicDBObject.parse</code> instead.</p>
  
  <pre><code>DBObject metadataObject = (DBObject)BasicDBObject.parse(jsonString);
  </code></pre>
  
  <p>Nevertheless, when <code>jsonString</code> is an array (like <code>"[{k: 'v'},{o: 'p'}]"</code> it throws an exception. <code>JSON.parse</code> works fine.</p>
  
  <p>o, What I want to get is using <code>BasicDBObject.parse(...)</code>:</p>
  
  <pre><code>(DBObject)JSON.parse("[{'hola': 'adeu'}, {'departament': [{'ambit': 'just', 'name': 'ts'}]}]");
  </code></pre>
  
  <p>code would be (this code crashes):</p>
  
  <pre><code>(DBObject)BasicDBObject.parse("[{'hola': 'adeu'}, {'departament': [{'ambit': 'just', 'name': 'ts'}]}]");
  </code></pre>
  
  <p>Any ideas?</p>