Hello Guys,
I'm wanting to download this JSON file (https://thingspeak.com/channels/144263/feed/last.json) and turn it into strings for my app. I've managed to write the part for the parser and when manually downloaded it works. But I cannot seem to get my head around HttpUtils2 to download this as a string.
This is the part i got so far.
Thanks,
Alex
I'm wanting to download this JSON file (https://thingspeak.com/channels/144263/feed/last.json) and turn it into strings for my app. I've managed to write the part for the parser and when manually downloaded it works. But I cannot seem to get my head around HttpUtils2 to download this as a string.
This is the part i got so far.
B4X:
Dim parser As JSONParser
parser.Initialize(The JSON FILE HERE)
Dim root As Map = parser.NextObject
Dim field1 As String = root.Get("field1")
Dim created_at As String = root.Get("created_at")
Dim field3 As String = root.Get("field3")
Dim entry_id As Int = root.Get("entry_id")
Dim field2 As String = root.Get("field2")
Dim field4 As String = root.Get("field4")
Log(field1)
Thanks,
Alex