o:profoxtech-boun...@leafe.com] On Behalf Of Paul
Newton
Sent: Friday, November 16, 2018 8:56 AM
To: profoxt...@leafe.com
Subject: RE: JSON for Visual FoxPro
Alan
The problem occurred when I was working in .NET - hence the need for
escaping the double quotes
Paul
-Original Message-----
From: Profox
Alan
The problem occurred when I was working in .NET - hence the need for escaping
the double quotes
Paul
-Original Message-
From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Alan Bourke
Sent: 16 November 2018 13:45
To: profoxt...@leafe.com
Subject: Re: JSON for Visual
TBF I don't think all those double quotes should be escaped anyway. IIRC it's
only if you're including string data and the string data has double quotes in
it.
{
"string1":"This value legitimately contains \"some quotes\""}
}
--
Alan Bourke
alanpbourke (at) fastmail (dot) fm
That function decodes unicode entities in case it can be of help
-
FUNCTION _FFWK_DecodeUnicodeEntities
LPARAMETERS tcString
LOCAL lcResultString, lnPosicion, lcChar, lcTokenString
Thanks Alan - I'll try that on some real JSON I am working with
-Original Message-
From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Alan Bourke
Sent: 16 November 2018 12:33
To: profoxt...@leafe.com
Subject: Re: JSON for Visual FoxPro
Sent by an external sender
Thanks Thierry - I'll look into it
-Original Message-
From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Thierry
Nivelet
Sent: 16 November 2018 12:29
To: profoxt...@leafe.com
Subject: Re: JSON for Visual FoxPro
Sent by an external sender
oops, sorry, it’s in the Web layer, not in the public layer
if you’re stuck and no dependency to the Web layer, I can move it to the public
layer AB
just let me know
Thierry Nivelet
> Le 16 nov. 2018 à 13:29, Thierry Nivelet a écrit :
>
> FoxInCloud has a FOSS function doing that, provided
nfjson seems okay with it if you strip out the escaping on the double quotes.
x = '{\"code\":\" ERROR\",\"message\":\"Message
\",\"errors\":[{\"field1\":\"FIELD\",\"value\":\"VALUE\"}]}'
y=chrtran(x,"\","")
oJson = nfJsonRead(y)
--
Alan Bourke
alanpbourke (at) fastmail (dot) fm
FoxInCloud has a FOSS function doing that, provided you remove the ‘\’ escape
characters:
o = uValueJS(Strtran('{\"code\":\" ERROR\",\"message\":\"Message
\",\"errors\":[{\"field1\":\"FIELD\",\"value\":\"VALUE\"}]}', '\"', '"'))
https://github.com/FoxInCloud/FoxInCloud-AB
9 matches
Mail list logo