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
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
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.

Drew
Reply all
Reply to author
Forward
0 new messages