ndb.Model实例具有以下
to_dict()功能:https
:
//developers.google.com/appengine/docs/python/ndb/modelclass#Model_to_dict
最简单的方法是:
json.dumps([p.to_dict() for p in Pasta.query(Pasta.name == "Ravioli").fetch()])

ndb.Model实例具有以下
to_dict()功能:https
最简单的方法是:
json.dumps([p.to_dict() for p in Pasta.query(Pasta.name == "Ravioli").fetch()])