首页 > 代码库 > JSONObjectWithData方法里options參数选择解释
JSONObjectWithData方法里options參数选择解释
NSJSONReadingMutableContainers
Specifies that arrays and dictionaries are created as mutable objects. // 创建可变的数组或字典 接收
NSJSONReadingMutableLeaves
Specifies that leaf strings in the JSON object graph are created as instances of NSMutableString. // 指定在JSON对象可变字符串被创建为NSMutableString的实例
NSJSONReadingAllowFragments
Specifies that arrays and dictionaries are created as mutable objects. // 创建可变的数组或字典 接收
NSJSONReadingMutableLeaves
Specifies that leaf strings in the JSON object graph are created as instances of NSMutableString. // 指定在JSON对象可变字符串被创建为NSMutableString的实例
NSJSONReadingAllowFragments
Specifies that the parser should allow top-level objects that are not an instance of NSArray or NSDictionary // 指定解析器应该同意不属于的NSArray或NSDictionary中的实例顶层对象
測试的 每一项都用字典接收,系统也没有给我报错。
难道这是给返回的data类型有关,假设返回的是字典或数组。就用第一项
JSONObjectWithData方法里options參数选择解释
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。