I am working on an application that uses SignalR-ObjC. I have set up the connection to our server and am receiving the correct data, but the response object is throwing me off. I am trying to parse the response to JSON and then a dictionary, but it looks like SignalR-ObjC is wrapping the response in extra data that is preventing me from parsing it to JSON.
This is what a slice of my response looks like:
RESPONSE: {
A = (
"{\"NotificationType\":1,\"TelemetryDetails\":{\"serialNumber\":\"xxx\",\"name\":\"xxx\",,\"protectedDeviceIp\":\"xxx\"},{\"endpoint\":\"xxx\",\"ip\":\"xxx\",\"domain\":null,\"latitude\":null,\"longitude\":null,\"protectedDeviceId\":\"xxx\",\"protectedDeviceIp\":\"xxx\"}]}]},\"CommandResult\":null,\"xxx\":\"xxx\"}"
);
H = NotificationsHub;
M = notificationData;
}
On all other platforms, my response is only what the value for "A" is here. Not sure why SignalR-ObjC is wrapping the response with all this extra data (hub information).
If I copy and paste the value from "A" in my response object into where "strData" is being encoded, the code to parse it works fine. However if I pass the whole response object, it breaks.
Bearing in mind my response objects looks to be a string, how can I extract the value for "A" or stop SignalR-ObjC from wrapping my response with this extra data?
I am working on an application that uses SignalR-ObjC. I have set up the connection to our server and am receiving the correct data, but the response object is throwing me off. I am trying to parse the response to JSON and then a dictionary, but it looks like SignalR-ObjC is wrapping the response in extra data that is preventing me from parsing it to JSON.
This is what a slice of my response looks like:
On all other platforms, my response is only what the value for "A" is here. Not sure why SignalR-ObjC is wrapping the response with all this extra data (hub information).
This is how I parse the response:
If I copy and paste the value from "A" in my response object into where "strData" is being encoded, the code to parse it works fine. However if I pass the whole response object, it breaks.
Bearing in mind my response objects looks to be a string, how can I extract the value for "A" or stop SignalR-ObjC from wrapping my response with this extra data?