The JSON file is properly downloaded - verified by log(j.GetString)
When I log the MAP it gives the proper values, but the Map I passed to the sub is empty when I query it later.
How would I get the value of the Map back into general usage?
When I log the MAP it gives the proper values, but the Map I passed to the sub is empty when I query it later.
How would I get the value of the Map back into general usage?
B4X:
DownloadJSON(f.AgentsMap, f.msFileAgents)
B4X:
Sub DownloadJSON(M As Map, Link As String)
Dim j As HttpJob
j.Initialize("", Me)
j.Download(Link)
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Log(j.GetString)
Dim JSON As JSONParser
JSON.Initialize(j.GetString)
M = JSON.NextObject
Log(M)
End If
j.Release
End Sub