Hi,
TG2 allows me  to return only dictionaries exposed as json. If the
result of a controller method is not a dictionary then it just returns
it literally. There is an easy workaround:

import simplejson as json

@expose('json')
def foo(self):
  return json.dumps([1,2,3])


However, the whole point of decorators is to handle generic
boilerplate stuff outside the function/method body. Is there a reason
for this limitation? Is it a bug?

Thanks, Carl



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to