#2373: @expose('json') won't return lists
----------------------------+-----------------------------------------------
 Reporter:  seedifferently  |        Owner:       
     Type:  defect          |       Status:  new  
 Priority:  normal          |    Milestone:  2.1a1
Component:  TurboGears      |      Version:  2.0.1
 Severity:  normal          |   Resolution:       
 Keywords:                  |  
----------------------------+-----------------------------------------------
Comment (by chrisz):

 This is a duplicate of #2034.

 Actually, the standard behavior of TG (WSGI, CherryPy) is to concatenate
 any sequenced output. But for JSON one might also expect that a list is
 return as a JSON array.

 The ZEN of Python says "In the face of ambiguity, refuse the temptation to
 guess." So maybe instead of concatenating the list as strings, in the case
 of JSON we should actually raise an error starting with TG 2.1.

 The error message should also mention the security issues involved with
 using top level JSON arrays, and recommend using a dict instead or setting
 a config switch to allow this (yet to be implemented).

 Leaving this ticket open to collect opinions about that.

-- 
Ticket URL: <http://trac.turbogears.org/ticket/2373#comment:1>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to