json-framework

How to parse a JSON having no quotes with its KEY string?

只谈情不闲聊 提交于 2019-12-23 13:07:32
问题 I want to parse the json output resulting from the following url in SBJSON framework for iOS http://maps.google.com/maps?q=school&mrt=yp&sll=13.006389,80.2575&output=json while(1);{title:"school - Google Maps",url:"/maps?q=school\x26mrt=yp\x26sll=13.006389,80.2575\x26ie=UTF8\x26hq=school\x26hnear=",urlViewport:false,ei:"RCu3T4eeMqSiiAe7k-yZDQ",form:{selected:"q",q:{q:"school",mrt:"yp",what:"school",near:""},d:{saddr:"",daddr:"",dfaddr:""},geocode:""}, I am using http://www.bodurov.com

Parse JSON data using Asihttprequest and the Json framework for iphone

拟墨画扇 提交于 2019-12-21 05:34:08
问题 I've been learning how to parse JSON using the JSON framework and ASIHTTPRequest for iOS. I've tested using twitter feeds and also a custom feed through a community tutorial. All is going well. I then thought I'll test using the Microsoft Odata Service for Northwind db. You can view the json results here: http://jsonviewer.stack.hu/#http://services.odata.org/Northwind/Northwind.svc/Products%281%29?$format=json Now I've struggling to work out how to parse just the product name. Can anyone

JSON Parse Error

匆匆过客 提交于 2019-12-20 05:28:55
问题 I am using SBJson framework (also known as json-framework) for the iOS. When parsing a certain JSON file, I am getting the following error: -JSONValue failed. Error is: Unescaped control character [0x09] ' I have used this framework many times and I am also parsing a very similar JSON file (that is even much longer) in that same app and it's working fine. I tried throwing around a bunch of NSLogs and everything seems to be fine. Can someone please point me to what this error means, or at

Using JSON Framework on iPhone - HELP!

人走茶凉 提交于 2019-12-11 03:51:18
问题 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/subscription/list?output=json&client=scroll"; ASIHTTPRequest * request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:url]]; [request setRequestMethod:@"GET"];

Core Data mishandles NSCFBoolean?

风流意气都作罢 提交于 2019-12-08 05:28:00
问题 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 that actually maps to a NSCFBoolean through the NSNumber interface. I'm using "json-framework" to encode some dictionary containing values coming from Core Data. The

JSON error on iPhone app

一曲冷凌霜 提交于 2019-12-07 14:32:07
问题 i am getting error when i try to run an app on my simulator. I have copied the JSON(JSON Framework) project in my app but my simulator crashes when it compiles the below lines,(I am using iOS 4.2) - (void)viewDidLoad { [super viewDidLoad]; NSString *jsonString = [NSString stringWithString:@"{\"foo\": \"bar\"}"]; NSDictionary *dictionary = [jsonString JSONValue]; NSLog(@"Dictionary value for \"foo\" is \"%@\"", [dictionary objectForKey:@"foo"]); } ERROR: 2011-03-02 13:33:37.304 test[10918:207]

Core Data mishandles NSCFBoolean?

寵の児 提交于 2019-12-07 07:38:25
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 that actually maps to a NSCFBoolean through the NSNumber interface. I'm using "json-framework" to encode some dictionary containing values coming from Core Data. The problem is that after saving and retrieving the data back, includeInHistory returns what appears to be a

Sectioned UITable & JSON

送分小仙女□ 提交于 2019-12-06 13:20:36
问题 I have been trying for days to figure out how to parse this JSON to a sectioned UITable but I am not successful, I've only been able to figure out how to get the section name, but failed to get each section row count and data for each row in each section. Since the transportation group may vary from time to time and their name may change, so I guess I need to use allKeys to find out each section title 1st. Please help and points me to the right direction to extract the data for a sectioned

JSON error on iPhone app

霸气de小男生 提交于 2019-12-05 18:56:16
i am getting error when i try to run an app on my simulator. I have copied the JSON(JSON Framework) project in my app but my simulator crashes when it compiles the below lines,(I am using iOS 4.2) - (void)viewDidLoad { [super viewDidLoad]; NSString *jsonString = [NSString stringWithString:@"{\"foo\": \"bar\"}"]; NSDictionary *dictionary = [jsonString JSONValue]; NSLog(@"Dictionary value for \"foo\" is \"%@\"", [dictionary objectForKey:@"foo"]); } ERROR: 2011-03-02 13:33:37.304 test[10918:207] -[NSCFString JSONValue]: unrecognized selector sent to instance 0x3034 2011-03-02 13:33:37.308 test

Parse JSON data using Asihttprequest and the Json framework for iphone

笑着哭i 提交于 2019-12-03 20:43:17
I've been learning how to parse JSON using the JSON framework and ASIHTTPRequest for iOS. I've tested using twitter feeds and also a custom feed through a community tutorial. All is going well. I then thought I'll test using the Microsoft Odata Service for Northwind db. You can view the json results here: http://jsonviewer.stack.hu/#http://services.odata.org/Northwind/Northwind.svc/Products%281%29?$format=json Now I've struggling to work out how to parse just the product name. Can anyone point me in the right direction? On my requestFinished i have this : - (void)requestFinished: