にNSStringのをパース:SBJSON私はSBJson 3.0.4を使用してNSDictionaryのにJSONデータが含まれていたNSStringを解析しようとしているが、私はそれを行うとき、私はこのエラーを取得するNSDictionaryの
"WebKit discarded an uncaught exception in the webView:shouldInsertText:replacingDOMRange:givenAction: delegate: -[__NSCFString JSONValue]: unrecognized selector sent to instance 0x6ab7a40"
限り私は(それほど遠くない)知っている、私は取得してJSONが有効なので、私はなぜこれが起こっているのか分からない。
NSString *tempURL = [NSString stringWithFormat:@"http://maps.googleapis.com/maps/api/geocode/json?address=%@&sensor=true",userInput.text];
NSURL *url = [NSURL URLWithString:tempURL];
NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url
cachePolicy:NSURLRequestReturnCacheDataElseLoad
timeoutInterval:30];
// fetch the JSON response
NSData *urlData;
NSURLResponse *response;
NSError *error;
// make the synchronous request
urlData = [NSURLConnection sendSynchronousRequest:urlRequest
returningResponse:&response
error:&error];
// construct a String around the Data from the response
NSString *data = [[NSString alloc] initWithData:urlData encoding:NSUTF8StringEncoding];
NSDictionary *feed = [data JSONValue];
文字列 'data'の値を出力します。データの内容をJSONLint.comのツールにコピーし、有効なJSONかどうかを確認します。何が起こるか教えてください。 i386アーキテクチャのための '未定義のシンボル: にObjC-クラス - :から参照 「_OBJC_CLASS _ $ _ SBJsonWriter」、 – Jim
それは私がコンパイルソースにそれを追加するのを忘れ、私は、私は今、2つのエラーを得ることをやった時に、有効な –