(IOS)JSON字串轉字典

weixin_33907511發表於2018-07-31

+ (NSDictionary*)parseJSONStringToNSDictionary:(NSString*)JSONString {

    NSData *JSONData = [JSONString dataUsingEncoding:NSUTF8StringEncoding];

    NSDictionary *responseJSON = [NSJSONSerialization JSONObjectWithData:JSONData options:NSJSONReadingMutableLeaves error:nil];

    returnresponseJSON;

}

相關文章