I'm using the JSON framework in Obj-C (iOS) to parse responses from a RESTful webservice (C#/.NET).
The framework is fine when it comes to arrays or objects, but one of the service calls is returning a string:
Raw value (in memory on the server):
41SIdX1GRoyw1174duOrewErZpn/WatH
JSON value in the http response once encoded by WCF:
"41SIdX1GRoyw1174duOrewErZpn\/WatH"
This is processed OK by counterpart JSON frameworks on Android, Windows Phone 7 and, of course, jQuery. The server also sometimes returns a .NET WebFaultException, which would automatically serialize an error message as "Error message here".
The JSON Framework comes back with an error: Token 'string' not expected before outer-most array or object
Anyone know how can I decode a javascript string in Objective C?
thanks Kris