关于iOS开发Json解析的几种方式

# define kGlobalQueue dispatch_get_global_queue (DISPATCH_QUEUE_PRIORITY_DEFAULT)

- () loadJsonData: url (*)

{

设置

*数据=https://www.yisu.com/zixun/[: url];

[(parseJsonData:):数据:],

});}


- () parseJsonData:数据(*)

{

*误差;

JSONObjectWithDataoptionskNilOptions错误(json==) {

@“json解析失败\ r \ n”

,

}

通过json字典变量来读取数据

}

- () convertToJson:数据(*)

{

NSJSONSerialization

{

*误差;


allocinitWithDataencodingNSUTF8StringEncoding dataWithJSONObjectoptionsNSJSONWritingPrettyPrinted误差

(json);}

}


关于iOS开发Json解析的几种方式