Hi friends!
I have a little problem, with JSON data generated by PHP's json_encode function.
---- data generated by PHP script on server ---
{"data":[{"id":"10045","nazwa":" Centrum Sprzedaży FIAT AUTO POLAND ","adres":"Katowicka 24 ","kod":" 43-30","miejscowosc":"Bielsko-Biała","szer":"49.8515014648438","dlug":"19.035400390625"},{"id":"55835","nazwa":" Inter-Oner","adres":"Bolesława Prusa 10","kod":"43-300","miejscowosc":"Bielsko-Biała","szer":"49.8007964","dlug":"19.0572596"}],"status":"OK"}
---- end of data ----
All looks good. Top level data is represented by object, elements "data" and "status". But code presented below does'nt recognize it:
-----
Sub hcSerwis_ResponseSuccess(Response As HttpResponse, TaskId As Int)
Dim Result, s As String
Dim i As Int
Result = Response.GetString("UTF8")
Dim json As JSONParser
json.Initialize(Result)
Dim JSONmap As Map
JSONmap = json.NextObject ' <--- error
.....
-------------
error: java.lang.ErrorException: JSON Object excepted.
JSONTokener is set at character 1 after execution json.NextObject.
BTW, similar data generated by Google Map API are parsed very well.
Any suggestion?
Have a nice day, Krzysztof