{
if (!(inObject instanceof BasicDBObject)) throw new IllegalArgumentException("Expected BasicDBObject as argument type!");
BasicDBObject in = (BasicDBObject)inObject;
JsonObject jsonObject = new JsonObject();
for (Entry<String, Object> entry : in.entrySet())
{
String key = mongo2GsonKey(entry.getKey());
Object val = entry.getValue();
if (val instanceof BasicDBList)
{