[Twisted-web] [Nevow] json serializer and strings

Manlio Perillo manlio_perillo at libero.it
Sat Sep 9 13:08:16 CDT 2006


Hi.

Why the json serializer does not support plain strings?

I'm having problems because I want to serialize keywords arguments and
the dictionary keys are str objects, not unicode.

There are some problems with this:

    elif isinstance(obj, str):
        w('"')
        w(stringEncode(obj.decode("us-ascii"))
        w('"')
?


I can use simplejson, but I don't want to add too many dependencies.


Thanks   Manlio Perillo



More information about the Twisted-web mailing list