我需要将 MongoDB 的结果放在 Map 中。我的代码是
DBCollection collection = db.getCollection("template");
DBCursor cursor = collection.find(allQuery, removeIdProjection);
DBObject resultElement = null;
resultElement = cursor.next();
结果Json是:
{ “GraphLabel”:“工单数量”,“XaxisLabel”:“2012”,“YaxisLabel”:“volume(k)”,“ShowLegend”:“FALSE”,“query”:“select sd.season_id,sd .season, count(fsf.defect_type_id) from m2m.season_dim sd ,m2m.field_service_fact fsf where fsf.season_id = sd.season_id group by sd.season_id"}
需要将值与 MAP 或 POJO .. 有人可以帮忙吗?