NSDictionary *categoryDic = [NSDictionary dictionaryWithObjectsAndKeys:@"技术",@"0", nil];
if ([NSJSONSerialization isValidJSONObject:categoryDic])
{
NSError *error;
NSData *categoryData = [NSJSONSerialization dataWithJSONObject:categoryDic options:NSJSONWritingPrettyPrinted error:&error];
jsonString=[[NSString alloc] initWithData:categoryData encoding:NSUTF8StringEncoding];
CLog(@"JSON:%@",jsonString);
}
[_knowledgePageClient getKnowledgeListWithStart:start limit:kHomeListLimit name:jsonString];
以NSString类型传递Json格式的参数,布布扣,bubuko.com
原文:http://www.cnblogs.com/tanwen1989/p/3598749.html