[sqlalchemy] association_proxy as property?

2010-11-16 Thread A . M .
Hello, To generate json from our SQLAlchemy model objects, we are using iterate_properties to determine how to dictify the object. One of our objects uses association_proxy which we would like to represent in the JSON. Unfortunately, because it is not a property, the dictification misses this

Re: [sqlalchemy] association_proxy as property?

2010-11-16 Thread Michael Bayer
On Nov 16, 2010, at 11:14 AM, A.M. wrote: Hello, To generate json from our SQLAlchemy model objects, we are using iterate_properties to determine how to dictify the object. One of our objects uses association_proxy which we would like to represent in the JSON. Unfortunately, because it

Re: [sqlalchemy] association_proxy as property?

2010-11-16 Thread A.M.
On Nov 16, 2010, at 11:43 AM, Michael Bayer wrote: On Nov 16, 2010, at 11:14 AM, A.M. wrote: Hello, To generate json from our SQLAlchemy model objects, we are using iterate_properties to determine how to dictify the object. One of our objects uses association_proxy which we would

Re: [sqlalchemy] association_proxy as property?

2010-11-16 Thread jason kirtland
On Tue, Nov 16, 2010 at 9:05 AM, A.M. age...@themactionfaction.com wrote: On Nov 16, 2010, at 11:43 AM, Michael Bayer wrote: On Nov 16, 2010, at 11:14 AM, A.M. wrote: To generate json from our SQLAlchemy model objects, we are using iterate_properties to determine how to dictify the object.

Re: [sqlalchemy] association_proxy as property?

2010-11-16 Thread Michael Bayer
On Nov 16, 2010, at 12:05 PM, A.M. wrote: 2. implicit conversion to JSON and such is a little sloppy. You'd be better off using a structured approach like Colander: http://docs.repoze.org/colander/ It looks like I would have to either re-define all objects using the Colander syntax