擅长:python、mysql、java
<p>mongodb中保存的每个文档都需要<code>'_id'</code>字段,该字段在集合中的文档中必须是唯一的。如果不提供一个,mongodb将自动创建一个带有<a href="http://docs.mongodb.org/manual/core/object-id/" rel="nofollow">^{<cd2>}</a>(<code>bson.objectid.ObjectId</code>的pymongo)</p>
<p>如果您需要将文档导出到json,则必须在json化之前弹出''u id'字段。在</p>