美文网首页
用SBJson将字典、数组转成json格式的字符串

用SBJson将字典、数组转成json格式的字符串

作者: wonderstruck | 来源:发表于2016-10-20 12:21 被阅读167次

SBJson的Github下载地址:
https://github.com/groopd/SBJSON-library

使用SBJson时ARC、MRC混编,在ARC环境下使用MRC的,在build phases下找到相应的.m文件写-fno-objc-arc。

使用方法:
//转成json格式的参数
SBJsonWriter *writer = [[SBJsonWriter alloc] init];
NSString *jsonStr = [writer stringWithObject:value];

可传数组或字典

相关文章

网友评论

      本文标题:用SBJson将字典、数组转成json格式的字符串

      本文链接:https://www.haomeiwen.com/subject/wsufuttx.html