Currently, we're using ASP.NET asmx web services to interface with our iPhone application.
My question is; whats the most ideal way of converting the responses from the services into objects which are easy to manage in Obj-C.
At present, we have defined a class which has all the methods in it (GetSomethingById), this then converts the JSON string to a JSON object using the json-framework. Then constructs the appropriate class with an "initWithJSON:(id)theJson" constructor.
The problem is... we seem to be at a constant battle as certain classes like to be autoreleased (therefore we have a mix of retained objects ([... retain]) and normal classes. This works perfectly but we're upsetting the Leaks tool!
I've seen a few solutions involving the use of Core Data. In summary:
- Consume web service
- "Serialize" into an appropriate data structure (class) <- This is the troublesome part
Can anyone recommend a sane solution?