On Jan 12, 2:58 am, Jeroen Ruigrok van der Werven <[EMAIL PROTECTED]
nomine.org> wrote:
> -On [20080112 08:38], Gowri ([EMAIL PROTECTED]) wrote:
>
> >Actually, I have one other problem after all this. I see that if I try
> >to construct JSON output as above, it is of the form
> >[{'isbn': u'1-56592-724-9', 'title': u'The Cathedral & the Bazaar'},
> >{'isbn': u'1-56592-051-1', 'title': u'Making TeX Work'}]
> >The extra 'u' seems to causing syntax error in JavaScript which is not
> >able to parse this response string. Any idea how I can fix this?
>
> JSON does not support Unicode in the sense of allowing raw Unicode codepoints.
> Instead JSON uses a \uNNNN scheme to encode Unicode characters (a bit flawed
> to limit it to four hexadecimal digits though, it leaves the whole CJK Unified
> Ideographs Extension B out of scope.).
>
> I use simplejson along with lxml/ElementTree for my JSON<>XML needs.
>
> --
> Jeroen Ruigrok van der Werven <asmodai(-at-)in-nomine.org> / asmodai
> イェルーン ラウフロック ヴァン デル ウェルヴェンhttp://www.in-nomine.org/|http://www.rangaku.org/
> Any road leads to the end of the world...

Thanks Jeroen. That helped a lot :)
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to