The easiest way is to write a to_dict() method on your models, and
then call that before converting to json.

On Mar 6, 6:28 am, Devraj Mukherjee <dev...@gmail.com> wrote:
> Hi all,
>
> Quick question about converting model objects in JSON. Have done some
> reading and I can't find a way to use simplejson to serialize model
> objects because the data types don't support it.
>
> What is the best way to convert a model to json?
>
> Thanks.
>
> --
> "The secret impresses no-one, the trick you use it for is everything"
> - Alfred Borden (The Prestiege)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to