Hi,
I seem to have an issue with parsing data returned by Google Maps Distance Matrix API
It may be something im doing wrong, but if i try to map data,
i get error " at org.json.JSONTokener.syntaxError(JSONTokener.java:450)"
where the GoogleJson_RetunedString is
I have parsed the data using other platforms, and the data is valid.
So i guess im doing something wrong in A4B.
Best regards
Lee.
I seem to have an issue with parsing data returned by Google Maps Distance Matrix API
It may be something im doing wrong, but if i try to map data,
B4X:
Dim parser As JSONParser
parser.Initialize(GoogleJson_RetunedString)
Log(parser.NextObject) 'just to have a peek
Dim m As Map
m = parser.NextObject 'thows error
where the GoogleJson_RetunedString is
B4X:
{
"destination_addresses" : [ "103 Birddog St, Binnaloop WA 6218, Australia" ],
"origin_addresses" : [ "62 Android Dr, Kingsway WA 6226, Australia" ],
"rows" : [
{
"elements" : [
{
"distance" : {
"text" : "11.1 km",
"value" : 11135
},
"duration" : {
"text" : "12 mins",
"value" : 739
},
"status" : "OK"
}
]
}
],
"status" : "OK"
}
I have parsed the data using other platforms, and the data is valid.
So i guess im doing something wrong in A4B.
Best regards
Lee.