[squeak-dev] Re: UTF8 in JSON (was: Re: [ANN] WebClient and WebServer 1.0 for Squeak)

Igor Stasenko siguctua at gmail.com
Tue May 11 22:34:51 UTC 2010


On 12 May 2010 01:12, Hannes Hirzel <hannes.hirzel at gmail.com> wrote:
> So String>> jsonWriteOn:aStream
>
> is now just
>
> jsonWriteOn: aStream
>       aStream nextPut: $".
>       aStream nextPutAll:  self.
>       aStream nextPut: $".
>
>
this is also wrong, because if your string contains a $" character
(and other control characters), it must be properly escaped:

'"' asJsonString  '"\""'

String crlf asJsonString  '"\r\n"'



>




-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list