mergeJSON on server problem

David Bovill david.bovill at gmail.com
Thu Nov 5 07:24:56 EST 2020


Let me dig into this in more detail with some tests - other data encoding is causing problems. Note I only find this on the unix server not with the local MacOS version of the same code and data.

I’m going to refer to this stack overflow answer regarding encoding:

https://stackoverflow.com/questions/583562/json-character-encoding-is-utf-8-well-supported-by-browsers-or-should-i-use-nu
On 2 Nov 2020, 09:28 +0000, Monte Goulding via use-livecode <use-livecode at lists.runrev.com>, wrote:
>
>
> > On 1 Nov 2020, at 6:21 am, David Bovill via use-livecode <use-livecode at lists.runrev.com> wrote:
> >
> > Thanks Mark - I may give fastjson a go.
> >
> > I tracked down the problem to the "\u00a0” unicode character in the json I fetched, which was causing mergeJSON to fail. This hack fixed the issue in a temporary way.
> > replace "\u00a0” with empty in episodeJson -- hack to remove "¬"
> >
> > Any thoughts on safe encoding of data I fetch fro jsonrpc calls so that it plays nicely with Livecode?
>
> Hi David
>
> The following seems to work without error:
> put format("[ \"\\u00a0\" ]") into tJSON; get JSONToArray(tJSON); put tJSON && it[1]
>
> Cheers
>
> Monte
> _______________________________________________
> 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