我需要將Map中的MongoDB結果。我的代碼是在java中映射DBObject
DBCollection collection = db.getCollection("template");
DBCursor cursor = collection.find(allQuery, removeIdProjection);
DBObject resultElement = null;
resultElement = cursor.next();
,結果JSON是:
{ 「GraphLabel」: 「卷工作單」, 「XaxisLabel」: 「2012」, 「YaxisLabel」:「卷( k)「,」ShowLegend「:」FALSE「,」query「: 」selectsd.season_id group by sd.season_id「}
需要用MAP或POJO來表示數值。有人可以幫忙嗎?
http://stackoverflow.com/questions/7684223/convert-dbobject-to的可能的複製-a-pojo-using-mongodb-java-driver –
我不想使用Jackson ... – user2572739