|  |      1520Python OP 翻了一遍 pymongo 的官方文档,没有找到 export 相关的资料。 | 
|  |      2williamZXS      2020-03-21 19:32:19 +08:00 有没有试过用 pymongo  coll.find() 的得到数据后 json.dump() 写到 json 文件 | 
|  |      3lithiumii      2020-03-21 19:40:36 +08:00 cur = db.collection.find({}) all_documents = list(cur) 然后你就得到了一个 collection 里所有的文件,接下来 json.dump 就是了 文件多到大于内存的话就 for doc in cur 然后接着写 | 
|  |      4520Python OP @williamZXS 好的,谢谢,明天试下! |