json-framework

How do I convert NSDecimalNumber to NSInteger?

OK, I'm using a JSON-enabled Rails web-service to provide data to an iPhone application. I'm finding my Integer values (IDs) are being interpreted by the json-framework as a NSDecimalNumber type. I need it as an integer. How can I get an integer value out of my NSDecimalNumber typed variable? I have tried everything I know, and I'm at my...

Core Data mishandles NSCFBoolean ?

Hi, I've got a Core Data managed object that has an attribute with a "Boolean" type. In my header file I've got this: @property (nonatomic, retain) NSNumber * includeInHistory; and I'm using a @dynamic includeInHistory implementation When interacting with an instance of this managed object before saving to disk, I've got something th...

Certain JSON requests crach on adHoc, but not on debug

Hi guys, I am using json-framework for communication purposes with certain web service. So far it has served me well. However, this code crashes my adHoc app on the device. The same app in debug mode on the device works ok. Here is my JSON request(that is where it crashes): //Make values dictionary NSMutableDictionary *valuesDictionar...

json-framework: EXC_BAD_ACCESS on stringWithObject

UPDATE: I found that the reason for the previous error was an error in the documentation. The method should be named proxyForJson, not jsonProxyObject... But I'm still stuck, though. I now get an EXC_BAD_ACCESS error inside stringWithObject some where. Any clues? UPDATE 2: My proxyForJson implementation is a cut-n-paste from th...

Xcode SVN can't add JSON directory to repository

I have added the JSON-framework (Stig B - Google code) to my Classes folder (just the JSON directory as per option 1 instructions). I had subversion set up which was working fine, until i added this directory. If I modify any existing files that were in the repository, they get marked as M and i can commit those, but i cannot commit th...

Access nested arrays and dictionaries generated by JSON-framework iPhone

I'm using a Google API to return some JSON, which i have converted to their Objective C types using the JSON-framework (Stig B - Google Code). I now have structures like this: responseData results [0] title = "Stack Overflow" cursor How can i access the nested array results to get at the title value (dicti...

json-framework error in iPhone static library

I have an iPhone app that uses the json-framework. I moved some of the code, including the json-framework source, from the main project to a static library. When I did this, the json-framework stopped getting compiled into the binary (double checked with class dump). This causes a nasty error: *** Terminating app due to uncaught excepti...

Send NSMutableArray as JSON using JSON-Framework

Hi all, I'm using JSON-Framework in my project successfully to decode JSON send from a server. Now I need to do it the other way around and I'm facing problems as the data to be sent is a NSMutableArray fetched from CoreData. When using NSString* jsonString = [menuItems JSONRepresentation] I get the message "JSON serialisation not ...

How to detect JSON object/JSON Array on XCode using JSON-Framework

Hello all, I have some problem with JSON parsing. When I hit URL, I've got JSON response like this: //JSON 1 { "data": {"array": ["3", {"array": [ {"id":"1","message":"Hello","sender":"inot"}, {"id":"2","message":"World","sender":"inot"}, {"id":"3","message":"Hi","sender":"marza...

What is the ideal way in the iPhone SDK to handle data coming from a web service?

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 ...

Using JSON Framework on iPhone - HELP!

Currently I am using the following code to parse the JSON link sent. This is how I also send a GET call to the Google Reader API for an upcoming iPhone application of mine. - (NSArray *)subscriptionList { if(!cookies && [cookies count] == 0) { [self requestSession]; } NSString * url = @"http://www.google.com/reader/api/0/subscripti...

Problem parsing following JSON with JSON Framework

I have the following json: { "response": { "status": 200 }, "user": { "flex_meta": { "layout": "[{\"windows\":[{\"type\":\"stream\",\"width\":260,\"x\":268,\"height\":763,\"y\":0,\"relatedDataObject\":{\"name\":\"watch\",\"id\":3190},\"arg\":\"watchlist:3190\"},{\"type\":\"rss\",\"width\":260,\"x...