[Twisted-web] small json improvements

Jp Calderone exarkun at divmod.com
Mon Sep 5 12:37:48 MDT 2005

On Mon, 5 Sep 2005 09:56:05 +0200, Eric Faurot <eric.faurot at gmail.com> wrote:
>On 9/4/05, Jp Calderone <exarkun at divmod.com> wrote:
> [snip]
>All I wanted was to be able to serialize 'regular' strings
>conveniently. Of course
>strings containing non-printable chars should be handled differently.

It sounds like you're in favor of the treat-as-ASCII rule then.  I've certainly written code that would have benefited from this behavior too, I just want to make sure there's no lurking downside before making the change.

>> Unicode serialization support is, of course, incomplete.
>Could you elaborate on this? I'm not sure to understand the issue here.
>What are javascript/browser requirements regarding unicode?

The problem is server-side (at least for the moment).  json.serialize() will do something if you give it a unicode string, but it will usually not be the correct thing.  This is fixable, someone just needs to get around to it.


More information about the Twisted-web mailing list