I'm very glad to know that turbojson could automatic convert SQLAlchemy object to JSON. But unfortunately, it can not handle SA object circuit.
For example, there are 2 of SA mapped class, User and Role. User has more than 1 role and a role could be given to many user. This is a very common M:N relationship in relational database. But turbojson can not convert an instance of User to JSON automatically, because there is a reference loop. What now we can do is add a "__json__" method to manually convert an object json, which is very tedious. So my suggestion is : why not just skipped there objects referenced more than one time? This will be a behavior easily undertood and will save a lot of time writing "__json__". --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

