字典类型的字符串转成字典

字典类型的字符串转成字典

 

- (NSDictionary *)parseJSONStringToNSDictionary:(NSString *)JSONString {
    NSData *JSONData = [JSONString dataUsingEncoding:NSUTF8StringEncoding];
    NSDictionary *responseJSON = [NSJSONSerialization JSONObjectWithData:JSONData options:NSJSONReadingMutableLeaves error:nil];
    return responseJSON;
}

 

posted @ 2017-05-16 16:52  李洪强  阅读(698)  评论(0编辑  收藏  举报