// // NSString+JSONExtentsion.m // Sleeper // // Created by Luo yuntao on 15/7/28. // Copyright © 2019年 YJJ. All rights reserved. // #import "NSString+JSONExtentsion.h" @implementation NSString (JSONExtentsion) - (id)jsonValue{ NSData *data = [self dataUsingEncoding:NSUTF8StringEncoding]; NSError *error = nil; id result = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&error]; if (nil != error) return nil; return result; } @end