title: How do I make casting to BasicDBList?
body: <p>I have an <code>ArrayList</code> (<code>json.get("pecas")</code>) in which needs to be transformed into <code>BasicDBList</code>, I tried to turn on <code>BasicDBObject</code> before. How do I do that?</p>
  
  <pre><code>BasicDBList pecas = ((BasicDBList) json.get("pecas"));
  </code></pre>
  
  <p>Error</p>
  
  <pre><code>java.lang.ClassCastException: java.util.ArrayList cannot be cast to com.mongodb.BasicDBList
  </code></pre>