Translating escape sequence
J. Landman Gay
jacque at hyperactivesw.com
Wed Mar 15 02:15:52 EDT 2017
On 3/14/17 11:58 PM, Phil Davis via use-livecode wrote:
> Maybe right after you import the JSON data, preprocess it with something
> like this:
> set the lineDelimiter to "\u"
> repeat for each line tLine in tJsonData
> put numToCodePoint("0x" & char 1 to 4 of tLine) & char 5 to -1 of
> tLine after tNewData
> end repeat
> put tNewData into tJsonData
> Then go on your merry way. Would that work?
Alas, no. I did something similar earlier this evening. If you replace
the escaped sequences before running it through jsonToArray, the
function throws [an error and gives] up. If you run jsonToArray first,
there are no escapes to process, they are all converted to garbage by then.
But Monte has a fix in the pipes. I think he's been lurking here and
fixing bugs before I can report them. He just wants us to think he's
I beat him to the bug in jsonImport though.
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode