#6716 __json__ should return plain dicts

v1.1.0
closed
General
2015-08-20
2013-09-27
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

  • Dave Brondsema

    Dave Brondsema - 2013-10-04
    • Milestone: forge-oct-18 --> forge-nov-01
     
  • Dave Brondsema

    Dave Brondsema - 2013-10-21
    • Size: --> 1
     
  • Cory Johns

    Cory Johns - 2013-10-23
    • status: open --> in-progress
    • assigned_to: Cory Johns
     
  • Cory Johns

    Cory Johns - 2013-10-23
    • status: in-progress --> code-review
     
  • Cory Johns

    Cory Johns - 2013-10-23

    allura:cj/6716

     
  • Dave Brondsema

    Dave Brondsema - 2013-10-25
    • status: code-review --> closed
    • QA: Dave Brondsema
     

Log in to post a comment.