Hi -

I'm trying to get the JSON string

"<prosody rate='-20%'>"

I can't figure out how to get there using NeoJSON, the JSON package, or
the JSON stuff from seaside.


Here are the results I'm getting in Pharo2

        str := String
                streamContents: [ :s |
                        s
                                nextPutAll: '<prosody rate=';
                                nextPut: $';
                                nextPutAll: '-20%';
                                nextPut: $';
                                nextPutAll: '>' ]




NeoJSONWriter toString: str '"<prosody rate=''-20%''>"'

"JSON package"
Json render: str '"<prosody rate=''-20%''>"'

"Javascript-Core"
str asJson '"<prosody rate=''-20%''>"'


When sent via a ZnClient POST the doubled single quotes are included in
the JSON body and misinterpreted by the receiving API.

Does anyone have a suggestion I could try?

Thanks

Paul

Reply via email to