You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
1.3 KiB

//
// MOBFJson.h
// MOBFoundation
//
// Created by vimfung on 15-1-20.
// Copyright (c) 2015年 MOB. All rights reserved.
//
#import <Foundation/Foundation.h>
/**
* JSON工具类
*/
@interface MOBFJson : NSObject
/**
* JSON字符串反序列化为对象
*
* @param jsonString JSON字符串
*
* @return
*/
+ (id)objectFromJSONString:(NSString *)jsonString;
/**
* JSON数据反序列化为对象
*
* @param jsonData JSON数据
*
* @return
*/
+ (id)objectFromJSONData:(NSData *)jsonData;
/**
* JSON字符串
*
* @param object
*
* @return JSON字符串
*/
+ (NSString *)jsonStringFromObject:(id)object;
/**
* JSON字符串
*
* @param object
* @param block
*
* @return JSON字符串
*/
+ (NSString *)jsonStringFromObject:(id)object serializeUnsupportedClassesUsingBlock:(id(^)(id object))block;
/**
* JSON数据
*
* @param object
*
* @return JSON数据
*/
+ (NSData *)jsonDataFromObject:(id)object;
/**
* JSON数据
*
* @param object
* @param block
*
* @return JSON数据
*/
+ (NSData *)jsonDataFromObject:(id)object serializeUnsupportedClassesUsingBlock:(id(^)(id object))block;
@end