Douglas Farias Expert Licensed User Longtime User Sep 27, 2015 #1 Hi all. My app get this response. {"success":true,"token":"28XJBC-XOANL_KC0999","events":[{"ID":"33","NAME":"Eu te amo ou Open Bar 2","date":"2015-10-31 23:00:00"},{"ID":"31","NAME":"Holi Festival - S\u00e3o Joaquim da Barra","date":"2015-11-22 14:00:00"}]} Click to expand... When i try get the value success this return the number 1 i dont know why the same code its working on android device Code: Copy Dim parser As JSONParser parser.Initialize(Job.GetString) Dim root As Map = parser.NextObject Dim token As String = root.Get("token") Dim events As List = root.Get("events") For Each colevents As Map In events Dim NAME As String = colevents.Get("NAME") Dim ID As String = colevents.Get("ID") Dim date As String = colevents.Get("date") Next Dim success As String = root.Get("success") on android return true or false is return only 1 what the problem here? its the same code, same response. why i got this value 1 on ios? log(success) result 1 thx all
Hi all. My app get this response. {"success":true,"token":"28XJBC-XOANL_KC0999","events":[{"ID":"33","NAME":"Eu te amo ou Open Bar 2","date":"2015-10-31 23:00:00"},{"ID":"31","NAME":"Holi Festival - S\u00e3o Joaquim da Barra","date":"2015-11-22 14:00:00"}]} Click to expand... When i try get the value success this return the number 1 i dont know why the same code its working on android device Code: Copy Dim parser As JSONParser parser.Initialize(Job.GetString) Dim root As Map = parser.NextObject Dim token As String = root.Get("token") Dim events As List = root.Get("events") For Each colevents As Map In events Dim NAME As String = colevents.Get("NAME") Dim ID As String = colevents.Get("ID") Dim date As String = colevents.Get("date") Next Dim success As String = root.Get("success") on android return true or false is return only 1 what the problem here? its the same code, same response. why i got this value 1 on ios? log(success) result 1 thx all
Erel B4X founder Staff member Licensed User Longtime User Sep 27, 2015 #2 Change success type to Boolean. Upvote 0