JSON, URL-encode, and UTF-8

Monte Goulding monte at sweattechnologies.com
Mon Aug 17 16:28:09 EDT 2015


I think we would need to see the API to know about the urlEncoding. Is it a parameter in your query string? If you need to urlEncode it will be the last thing you do. If you are using one of the script libraries the UTF8 encoding may be done for you. If you are using mergJSON then UTF8 encode anything that's not ASCII before you JSON encode.

Cheers

Monte

Sent from my iPhone

> On 18 Aug 2015, at 4:41 am, J. Landman Gay <jacque at hyperactivesw.com> wrote:
> 
> I've confused myself. I need to send JSON to a server. The values will have foreign characters in them. So I think I need to use textEncode to convert it to UTF8 and also it needs to be URL encoded. Is that right? And if so, what order do I do it in?
> 
> Do I URL-encode each value in the array, then create the JSON, then textEncode that? Or some other order? Or does textEncoding remove the need to URL encode?




More information about the use-livecode mailing list