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 is not a property, the dictification misses this > property. I feel like I am missing something simple here. > > How can I make an association_proxy appear to be a property which appears in > iterate_properties of the mapper?
1. why not use dir(myobject) to get a view of your object as a whole ? 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/ -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.