I use a the Chilkat ActiveX control for many things. The Json part of the control is free for use. http://chilkatsoft.com/
He has VFP examples on the website. And the times I've had problems, he was quick to respond.
LOCAL loArray as Chilkat_v9_5_0.IChilkatJsonArray LOCAL loObject as Chilkat_v9_5_0.IChilkatJsonObject loObject = CreateObject('Chilkat_9_5_0.JsonObject') json = CHRTRAN('{"code":" ERROR","message":"Message ","errors":[{"field1":"FIELD","value":"VALUE"}]}',"","") ?'--' loObject.load(json) ?loObject.stringof("code") loArray = loObject.arrayof("errors") ?loArray.ObjectAt(0).StringOf("field1") ?loArray.ObjectAt(0).StringOf("value") ?loObject.emit()
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Paul Newton Sent: Friday, November 16, 2018 8:56 AM To: profoxtech@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: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Alan Bourke Sent: 16 November 2018 13:45 To: profoxtech@leafe.com Subject: Re: JSON for Visual FoxPro
Sent by an external sender ------------------------------
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
[excessive quoting removed by server]