Hello,
please find the code attached below.
the following is compiled successfully but while running it's giving an error :
terminate called after throwing an instance of 'web::json::json_exception'
what(): Unexpected token near line 1, column 1
Aborted (core dumped)
the below code is running successfully for all API's except the google api .
A few of google API for which it is giving error are :
http://maps.google.com/maps/api/geocode/json?address=phase2+electronic%20city,bangalore,karnataka&sensor=false
http://maps.googleapis.com/maps/api/geocode/json?latlng=12.854911,77.668072&sensor=true
Comments: I tried getting the JSON with IE and saved it to a file. The JSON parser has no problem with it. I tried doing what your code does, download from Google maps directly, no problem. The only difference I see is that my tests uses those two links hard coded, not taking any user input of coordinates. As I mentioned earlier, we'll need to see the string representation of the response in order to do any troubleshooting.
please find the code attached below.
the following is compiled successfully but while running it's giving an error :
terminate called after throwing an instance of 'web::json::json_exception'
what(): Unexpected token near line 1, column 1
Aborted (core dumped)
the below code is running successfully for all API's except the google api .
A few of google API for which it is giving error are :
http://maps.google.com/maps/api/geocode/json?address=phase2+electronic%20city,bangalore,karnataka&sensor=false
http://maps.googleapis.com/maps/api/geocode/json?latlng=12.854911,77.668072&sensor=true
Comments: I tried getting the JSON with IE and saved it to a file. The JSON parser has no problem with it. I tried doing what your code does, download from Google maps directly, no problem. The only difference I see is that my tests uses those two links hard coded, not taking any user input of coordinates. As I mentioned earlier, we'll need to see the string representation of the response in order to do any troubleshooting.