friends
I'm learning how to use JSON for data transfer
Build a server to provide data.
The JSON string is correct?
{"result":[[{"CODIGO":"1 ","NOME":"PLASTICOS"},{"CODIGO":"2 ","NOME":"VIDROS"},{"CODIGO":"3 ","NOME":"BRINQUEDOS"},{"CODIGO":"4 ","NOME":"IMPORTADOS"},{"CODIGO":"5 ","NOME":"METAIS"},{"CODIGO":"6 ","NOME":"PAPELARIA"},{"CODIGO":"7 ","NOME":"T\u00C9RMICOS"},{"CODIGO":"8 ","NOME":"DIVERSOS"}]]}
My code for read and show the log ( very simple )
My Server work
Someone could send me some tips
thank you
I'm learning how to use JSON for data transfer
Build a server to provide data.
The JSON string is correct?
{"result":[[{"CODIGO":"1 ","NOME":"PLASTICOS"},{"CODIGO":"2 ","NOME":"VIDROS"},{"CODIGO":"3 ","NOME":"BRINQUEDOS"},{"CODIGO":"4 ","NOME":"IMPORTADOS"},{"CODIGO":"5 ","NOME":"METAIS"},{"CODIGO":"6 ","NOME":"PAPELARIA"},{"CODIGO":"7 ","NOME":"T\u00C9RMICOS"},{"CODIGO":"8 ","NOME":"DIVERSOS"}]]}
My code for read and show the log ( very simple )
PHP:
Dim JSON As JSONParser
Dim Map1 As Map
JSON.Initialize(File.ReadString(File.DirDefaultExternal, "marana.json"))
Map1 = JSON.NextObject
Dim m As Map 'helper map for navigating
Dim MenuItems As List
m = Map1.Get("result")
m = m.Get("")
MenuItems = m.Get("")
For i = 0 To MenuItems.Size - 1
m = MenuItems.Get(i)
Log(m.Get("value"))
Next
My Server work
Someone could send me some tips
thank you