json流解析叠加器

1 //实现了流解析配置代理协议
2 @interface SBJsonStreamParserAccumulator : NSObject <SBJsonStreamParserAdapterDelegate>
3
4 //声明的value对象,表示解析完成后的objc对象
5 @property (copy) id value;
6
7 @end

实现了配置代理协议SBJsonStreamParserAdapterDelegate的两个方法:

 1 /**
2 返回NSArray或NSDictionary对象
3 */
4 - (void)parser:(SBJsonStreamParser*)parser foundArray:(NSArray *)array {
5 value = array;
6 }
7
8 - (void)parser:(SBJsonStreamParser*)parser foundObject:(NSDictionary *)dict {
9 value = dict;
10 }





相关文章:

  • 2022-12-23
  • 2021-10-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-12
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案