Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#6716 __json__ should return plain dicts

forge-nov-01
closed
Cory Johns
cleanup (28)
General
1
2013-10-25
2013-09-27
Dave Brondsema
No

All __json__ methods should return "plain" data structures. A particular example is that lists and dicts shouldn't be ming instrumented containers. Then it'll always be safe to modify the results without side effects (i.e. changing the database).

Some sort of helper function seems like it would be useful. It should preserve certain types (e.g. datetime, int, float, etc) since those aren't any risk and are converted to json just fine by TurboGears

Discussion


Anonymous


Cancel   Add attachments