Mbotais
New Member
I want to read JSON data, like the code but error
this is the code :
this is the code :
B4X:
Sub Button1_Click
Dim j As HttpJob
j.Initialize("", Me)
j.Download("http://103.124.137.197/NAPI/api/read_barang.php")
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Log(j.GetString)
Dim parser As JSONParser
parser.Initialize(j.GetString)
Dim root As List = parser.NextArray
For Each colroot As Map In root
Dim ST_ID As String = colroot.Get("ST_ID")
Dim BR_DISKON As String = colroot.Get("BR_DISKON")
Dim BR_ID As String = colroot.Get("BR_ID")
Dim BR_STOK As String = colroot.Get("BR_STOK")
Dim BR_SAT As String = colroot.Get("BR_SAT")
Dim BR_HARGA As String = colroot.Get("BR_HARGA")
Dim STU_NAMA As String = colroot.Get("STU_NAMA")
Dim BR_NAME As String = colroot.Get("BR_NAME")
Next
End If
j.Release
End Sub