本地测试接口代码
Posted 「违规用户」
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了本地测试接口代码相关的知识,希望对你有一定的参考价值。
NSError *error;
NSString *path = [[NSBundle mainBundle] pathForResource:@"LockQueueJSON" ofType:@""];
NSString *textFileContents = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:&error];
NSData *jsonData = [textFileContents dataUsingEncoding:NSUTF8StringEncoding];
NSError *err;
NSDictionary *resultDic = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:&err];
result = [NWResult resultWithAttributes:resultDic];
以上是关于本地测试接口代码的主要内容,如果未能解决你的问题,请参考以下文章