Newer
Older
XinYang_IOS / YH_Category / NSString+JSONExtentsion.m
@zhangfeng zhangfeng on 7 Dec 2023 486 bytes 1.8.0
//
//  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