JSON serialization of Google App Engine models

后端 未结 14 2131
不知归路
不知归路 2020-12-04 04:59

I\'ve been searching for quite a while with no success. My project isn\'t using Django, is there a simple way to serialize App Engine models (google.appengine.ext.db.Model)

14条回答
  •  难免孤独
    2020-12-04 05:41

    Even if you are not using django as a framework, those libraries are still available for you to use.

    from django.core import serializers
    data = serializers.serialize("xml", Photo.objects.all())
    

提交回复
热议问题