Hi,
I am attempting to use xcall JSON with opcode 4 to unescape a string. I seem to be experiencing an issue which is reproduceable with the below program.
MAP1 response$,s,132
MAP1 sts,f,6
response$ = "t"+CHR(34)+"est"
Trace.Print response$
XCALL JSON, 3, sts, response$
Trace.Print sts, response$
! Process response string.
XCALL JSON, 4, sts, response$
Trace.Print sts, response$
END
Which produces the following traces on 7.0.1770.1 EL7:
response$=[t"est]
sts=[0], response$=[t\"est]
sts=[1], response$=[teest]
It appears that the e gets duplicated and the " gets completely removed with opcode 4.
Also, shouldn't the status from opcode 3 be 1 instead of 0 since 1 character (the quote) was escaped?
Thanks,
John Andreasen
Diversified Data Software