removing quotation marks from string values returned in JSON
28 views
Skip to first unread message
drewda
unread,
Sep 7, 2009, 2:35:49 PM9/7/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-piston
Hi all,
Another quick question re producing JSON for ExtJS. I'd like to
produce boolean values. ExtJS is expecting this to take the form of
true/false without quotation marks, but when I produce a dictionary,
the value has to be in quotation marks and what ultimately appears in
the JSON is also surrounded by quotation marks. Suggestions?
Thanks much!
Drew
drewda
unread,
Sep 8, 2009, 8:57:37 PM9/8/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-piston
For the record, I'll mention the horribly simple solution I only
realized today: Just capitalize "true" and "false" (without quotation
marks, of course) and Python will treat them like Boolean values and
pass them on for the JSON accordingly.