JSON serialization of Google App Engine models

Posted by user111677 on Stack Overflow See other posts from Stack Overflow or by user111677
Published on 2009-10-07T13:01:17Z Indexed on 2010/04/08 6:53 UTC
Read the original article Hit count: 349

Filed under:
|
|

I've been search 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) into JSON or do I need to write my own serializer? My model class is fairly simple. For instance:

class Photo(db.Model):
filename = db.StringProperty()
title = db.StringProperty()
description = db.StringProperty(multiline=True)
date_taken = db.DateTimeProperty()
date_uploaded = db.DateTimeProperty(auto_now_add=True)
album = db.ReferenceProperty(Album, collection_name='photo')

Thanks in advance.

© Stack Overflow or respective owner

Related posts about google-app-engine

Related posts about python