Page 1 of 1

JSON parser

Posted: Sat Mar 10, 2018 6:33 pm
by gnewcomb
What are the currently available options for parsing a JSON string? Did DC_JS2ObjectTree() ever materialize or is there something else?

Re: JSON parser

Posted: Sun Mar 11, 2018 2:08 am
by Tom
Var2JSON is a(n undocumented) part of Xbase++ 2.0, and they're currently working on JSON2Var, as the rumors say. Before that is finished, you may create you own function, based on DC_TokenArray and others. ;)

Re: JSON parser

Posted: Sun Mar 11, 2018 9:44 am
by rdonnay
Also, look at DC_Js2Var(), DC_Js2Array(), DC_Value2Js(), DC_Array2Js(), DC_Object2Js(), DC_Js2Object(), DC_Object2Xml(), DC_Array2Xml(), DC_Value2Xml().

The source is in _DCFUNCT.PRG>