}
public static BasicDBList gson2MongoArray(JsonElement inElement)
{
JsonArray in = inElement.getAsJsonArray();
BasicDBList out = new BasicDBList();
for (int i = 0; i < in.size(); i++)
{
JsonElement element = in.get(i);
if (element.isJsonArray())
{
out.add(gson2MongoArray(element));
}
else if (element.isJsonObject())
{
out.add(gson2MongoObject(element));
}
else
{
out.add(gson2MongoPrimitive(element));
}
}
return out;
}