JSON/XML Serialization

113 views
Skip to first unread message

wmdmark

unread,
Apr 8, 2008, 9:18:03 PM4/8/08
to Google App Engine
I'm new to Python so I would appreciate some help from anyone with
more experience.

Basically I would like to create a RequestHandler that can execute
CRUD operations on a given Model using JSON or XML as the as the data
format. I tried using Django's JSONSerializer class to serialize
entities but kept getting exceptions because Google's Model class
doesn't have "__meta" or something weird like that.

Could anyone point me in the right direction?

Thanks so much,
Mark

Brett Morgan

unread,
Apr 8, 2008, 9:19:27 PM4/8/08
to google-a...@googlegroups.com
A point to start for python and JSON:

http://developer.yahoo.com/python/python-json.html

Joel Clark

unread,
Apr 8, 2008, 10:40:58 PM4/8/08
to Google App Engine
I am quite interested in XML serialization but get the same kind of
errors with django's. Wonder if we should feature-request a patched
version of django's serializers that work with Google's model
implementation...

Regards,
Joel

On Apr 8, 9:19 pm, "Brett Morgan" <brett.mor...@gmail.com> wrote:
> A point to start for python and JSON:
>
> http://developer.yahoo.com/python/python-json.html
>

Brett Morgan

unread,
Apr 8, 2008, 11:12:01 PM4/8/08
to google-a...@googlegroups.com
Time to do some debugging.

ryan

unread,
Apr 9, 2008, 2:43:41 AM4/9/08
to Google App Engine
You might want to look at the Model.to_xml() method:

http://code.google.com/appengine/docs/datastore/modelclass.html#Model_to_xml

There's no from_xml() method, but writing your own would be pretty
straightforward.
Reply all
Reply to author
Forward
0 new messages