I am getting response from server in JSONArray format. I am not able to retrieve the contents of array also my JSONArray has no Square brackets.
I am passing the response in php as json_encode($array)
in server side
response {
community = “worker”
communitystr = "<null>";
workspace = abs;
email = "<null>";
admin = false;
persona = "<null>";
userinfo = {
info = {
contact1 = {
firstname = “jon”;
lastname = “Doe”
phone = “9885678905”;
objectname = contact;
id = 9;
};
event1 = {
eventname = “party”;
description = "";
order = 6;
id = 4;
objectname = events;
};
files = {
filename = “sample”;
description = "";
order = 11;
id = 11;
objectname = files;
};
};
};
};
I checked many links and all have used JSONObject()
. But same is not working for me.
How do I get each values in this JSON Response ?