Reading in json formated response
-
- Posts: 605
- Joined: Thu Jan 28, 2010 9:11 pm
- Location: Steven Point, Wisconsin USA
- Contact:
Reading in json formated response
I see functions in Express++ to convert data to the JSON format. When you make a webrequest that returns a JSON structure as its content, is there a function/example in express to load that into an object or array, similar to the functions to create xml trees objects.
Re: Reading in json formated response
I created functions like DC_Array2Js(), DC_Value2Js(), DC_Object2Js() but it never occurred to me that we may need to convert back from Json to another type. It was easy to go from Xml to a tree view because I use the Alaska XML parser. There is no Json parser. I would have to write one.
Alaska also added functions like Var2Json() and Var2Xml() but they don't have a Json2Var() because the var can be either an object or an array.
JSON is alway a character string and it looks like someone needs to write a parser for it.
Alaska also added functions like Var2Json() and Var2Xml() but they don't have a Json2Var() because the var can be either an object or an array.
JSON is alway a character string and it looks like someone needs to write a parser for it.
The eXpress train is coming - and it has more cars.
-
- Posts: 605
- Joined: Thu Jan 28, 2010 9:11 pm
- Location: Steven Point, Wisconsin USA
- Contact:
Re: Reading in json formated response
In my case the output is rather simple but just inquiring so as not to reinvent the wheel.
Re: Reading in json formated response
Did anything ever happen with a json parser ?
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises
-
- Posts: 605
- Joined: Thu Jan 28, 2010 9:11 pm
- Location: Steven Point, Wisconsin USA
- Contact:
Re: Reading in json formated response
I have looked at some vb code and some foxpro code but have not delved into trying to write it. For my current usage, it was rather easy as I know what what I would receive and basically just used dc_tokenarray.
But a more robust methodology would be desirable.
Again, I don't know why Alaska, wanting to do more internet enabling would be leaving this out. More users than not would be receiving json to use from services than necessarily sending. But if you are sending, you are likely also receiving.
Sort of like xml.
I know pablo has something using ot4xb.
But a more robust methodology would be desirable.
Again, I don't know why Alaska, wanting to do more internet enabling would be leaving this out. More users than not would be receiving json to use from services than necessarily sending. But if you are sending, you are likely also receiving.
Sort of like xml.
I know pablo has something using ot4xb.