> I am sure my question is the dummest question but I couldn't find any
> link.
> So I am trying to create a JSON Object in python and then send it as a
> response.
There's nothing built in to Python or included in GAE. I quite like
simplejson, which makes it really easy:
import simplejson
self.response.out.write(simplejson.dumps(my_data))
Dave.
- Yagiz -
That's correct -- there's no way for *any* JSON library to do that
automatically and correctly.
Dave.
> Problem solved. Yeah........ !!!!
> I am not sure why but simplejson.dump(my_dict) didn't work for me and
> was throwing some kind of exception but demjson worked on the first
> attempt.
That would be because the function is called "dumps", not "dump".
Dave.