#2034: json array support
-----------------------------+----------------------------------------------
Reporter: j_king | Owner: chrisz
Type: enhancement | Status: new
Priority: normal | Milestone: 2.0
Component: TurboJson | Version:
Severity: normal | Resolution:
Keywords: json, turbojson |
-----------------------------+----------------------------------------------
Changes (by chrisz):
* type: defect => enhancement
* severity: major => normal
Comment:
Please specify a TG version for this ticket.
This is not a bug. Output that you want to be rendered by a templating
engine (including JSON) must be returned as a dictionary. If you return a
sequence, as in your case, TG 1.x lets CherryPy concatenate its items as
strings, resulting in an error message here. You get a I don't know what
TG 2.x does or is supposed to do with a sequence.
We may consider to send lists to the templating engine if the format
parameter is set to "json". This would allow us to return JSON lists on
the top level. This would require changes in turbogears.controllers and
also in turbojson. Or maybe better, we should print a proper error message
or warning, because JSON lists on the top level are known to be a security
issue.
--
Ticket URL: <http://trac.turbogears.org/ticket/2034#comment:2>
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
-~----------~----~----~----~------~----~------~--~---