Dave,
Web calls from VFP require a COM object, or Rick's WestWind tool for C# DLL interaction. I am working with a COM control which has both http and JSON built into it. The full suite has many things, including pop, SMTP, IMAPI, and more. You can find it inexpensive at http://chilkatsoft.com The developer is responsive to support request. There are many FoxPro examples on the site.
I will say building JSON is faster with string building in VFP, than with any tool I've used.
I have tried the VFP classes available to use JSON with the project data I'm working on. The speed of them is far too slow. The larger more complex the JSON, the slower the VFP tools worked. This COM object is quick. And looping through an array doesn't require much. https://www.example-code.com/foxpro/json_paths.asp
HTH, Tracy
On September 13, 2016 6:44:10 AM EDT, Dave Crozier DaveC@Flexipol.co.uk wrote:
Fellow Gentlemen, I posted a request about doing geocoding requests to receive back a Lat/Long dataset for various addresses a few weeks ago and now find that Google do in fact provide a Geocoding service:
https://developers.google.com/maps/documentation/geocoding/start
The responses back from the requests are all JSON from a Java Script API run by Google. I have looked over Rick's Westwind site to try and get a start on using this method to get back a JSON response but seem to be getting nowhere fast. Anyone got any ideas on a simple & neat way of retrieving this data back using VFP programmatically? Either that or anyone know a free Geocoding site that would handle up to 100 name and address calls per day ideally by sending a text file and receiving one back which could be automated from the VFP end.
Never even looked at Web services in anger before so it all seems a little baffling and terribly long winded at the moment unless I am missing something obvious.
Note I don't want to have to drop into an intermediate program/language to accomplish this, if possible.
Dave