具体做法用基本数据类型bool 或者BOOL定义变量
bool isTrue = true
[dic setValue: @(isTrue) foKey:@"IsShown"];
将字典转化为字符串类型将jsonStr转化为data类型放到请求体中传给服务器即可
NSData *data = [NSJSONSerializationdataWithJSONObject:tempDictoptions:NSJSONWritingPrettyPrintederror:NULL];
NSString *jsonStr = [[NSStringalloc]initWithData:dataencoding:NSUTF8StringEncoding];
[req setHTTPBody:[jsonString dataUsingEncoding:NSUTF8StringEncoding]];
打印jsonStr: {"IsShown":true}