private static DBObject buildDBList(JsonTreeNode parentNode) {
BasicDBList basicDBList = new BasicDBList();
Enumeration children = parentNode.children();
while (children.hasMoreElements()) {
JsonTreeNode node = (JsonTreeNode) children.nextElement();
MongoValueDescriptor descriptor = (MongoValueDescriptor) node.getDescriptor();
Object value = descriptor.getValue();
if (value instanceof DBObject) {
if (value instanceof BasicDBList) {
basicDBList.add(buildDBList(node));
} else {
basicDBList.add(buildDBObject(node));