def getSpecificId(id): result = objectIdDecoder(list(collection.find({"_id": ObjectId(id)}))) return str(result) def objectIdDecoder(list): results=[] for document in list: document['_id'] = str(document['_id']) results.append(document) return results pymongo를 통해 collection을 find한 다음 받은 ObjectId는 유효한 json type이 아니다. 그러므로 json형태로 사용할 경우에는 ObjectId를 String으로 변환하는 작업을 해야합니다. 이때 ObjectIdDecoder가 Lis..