TextDecode JSON array

Trevor DeVore lists at mangomultimedia.com
Sun Jan 22 04:52:01 CET 2017


That is UTF-8. I've seen older versions of Ruby on Rails would use escape
sequences like that  in JSON responses.

-- 
Trevor DeVore

On Sat, Jan 21, 2017 at 9:22 PM J. Landman Gay via use-livecode <
use-livecode at lists.runrev.com> wrote:

> Here's a test sample of some UTF8 I get back from a server:
>
>
>
>    {"UserID":48,"UserName":"Eduardo Ba\u00f1uls","UserLoginName":"ebanu"}
>
>
>
>
>
> If I run textDecode(<string>,"UTF8") on it, I get it back unaltered.
>
> Does anyone recognize the text encoding? It doesn't seem to be UTF8.
>
>
>
> If I then run JSONToArray on it, I get a LC array and the name is
>
> changed to this:
>
>
>
>    Eduardo Bañuls
>
>
>
> And when I run textDecode on *that* it comes out right:
>
>
>
>    Eduardo Bañuls
>
>
>
> So what's the first string? JSONtoArray seems to recognize it. I'd like
>
> to decode the JSON array completely before passing it to JSONtoArray. If
>
> I can do that, I don't have to loop through all the array keys, decoding
>
> each one individually.
>
>
>
> --
>
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
>
> HyperActive Software           |     http://www.hyperactivesw.com
>
>
>
>
>
> _______________________________________________
>
> use-livecode mailing list
>
> use-livecode at lists.runrev.com
>
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
>
> http://lists.runrev.com/mailman/listinfo/use-livecode


More information about the use-livecode mailing list