shazaman23 / webapp-improved

Automatically exported from code.google.com/p/webapp-improved
Other
0 stars 0 forks source link

Please create an easy way to convert models to JSON #37

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
This bug is related to 
http://code.google.com/p/appengine-ndb-experiment/issues/detail?id=103 .

It should be really easy to convert a db (or ndb) Model to json with
json.dumps(model._to_dict, default=webapp2.JsonCompatible)

What is the expected output? What do you see instead?
  At the moment json.dumps(db.to_dict(model)) throws an error for
models with blobstore keys and a few other basic properties.

Original issue reported on code.google.com by jim.morr...@gmail.com on 5 Dec 2011 at 11:59