Sub hc_ResponseSuccess (Response As HttpResponse, TaskId As Int)
Try
Dim res As String
res = Response.GetString("UTF8")
Dim parser As JSONParser
parser.Initialize(res)
Select TaskId
Case 1
Dim events As List
events = parser.NextArray
For i = 0 To events.Size - 1
Dim m As Map
m = events.Get(i)
Dim iEventID As Int
Dim sEventDate, sEventName As String
iEventID=m.Get("idx")
sEventDate = m.Get("EventDate")
sEventName= m.Get("EventName")
lstEvents.AddSingleLine(iEventID & " : " & sEventDate & " - " & sEventName)
Next
End Select
ProgressDialogHide
Response.Release
Catch
ProgressDialogHide
Response.Release
End Try
End Sub