有人知道如何使用SBJson库吗?
我在目标C中有这段代码
NSString *responseString = [request responseString];
NSDictionary *responseDict = [responseString JSONValue];试着
var responseString = request.responseString
let responseDict: NSDictionary = responseString.JSONValue"() ->字符串没有名为JSONValue的成员“
我包括了
#import "SBJson.h"在“MyProjectName”中-桥接-Header.h
发布于 2014-11-02 10:43:34
刚刚发现: SBJson中的扩展应用于NSString类型,但Swift字符串类型则不同。
它适用于以下代码:
var responseString: NSString = request.responseString()
let responseDict: NSDictionary = responseString.JSONValue() as NSDictionaryhttps://stackoverflow.com/questions/26698394
复制相似问题