I have a problem I do not know how to convert the List<document>
to json:
public static List<Document> d() {
conexion c = new conexion();
List<Document> resultados = new ArrayList<>();
for (Document cur : c.table.find()){
resultados.add(cur);
}
return resultados;
}