public void BuscarPorfecha(String fecha) {
BOE boe = new BOE();
List<BOE> lista = new ArrayList<BOE>();
int i = 0;
MongoCursor<Document> cursor = collection.find(eq("fecha", fecha)).iterator();
while (cursor.hasNext()) {
System.out.println(cursor.next().toJson());
}
}
How could I create an object from the cursor.next (). toJson () ??