我的回应:(JSON)
NSString *responseString = [[NSString alloc] initWithData:responseData4 encoding:NSUTF8StringEncoding];
NSLog(@"responseString... %@",responseString);
{"AT":"dMaOtJxV0EgAAAAAAAAAAAAAAAAAAAAA","DId":320,"EMs":null,"Em":null,"LGT":null,"OS":"Success","PWD":"DEBC0C7321EF1386F7F22A3D8BE754C9FF04A596","SId":0,"Sku":"Director","UId":1664,"UN":"s1","COM":null,"DN":null,"DOS":null,"EA":"s+1@gmail.com","FN":"s","IsCon":true,"IsLT":true,"IsPU":false,"IsSuc":false,"IsSync":true,"IsTri":false,"LLD":"\/Date(-62135578800000-0500)\/","LN":"k","MOD":null,"NDD":"\/Date(1376971200000-0400)\/","NDDS":"8\/20\/2013","PN":"(324) 325-4353","SD":"s","SLT":"HBoY7mHJ","STs":"EN","UQId":null,"US":3,"Ver":null}
我必须在这里获取 IsPU,IsCon 标记值。
然后我写了类似的代码
NSError *error;
id jsonMain = [NSJSONSerialization JSONObjectWithData:responseData4 options:kNilOptions error:&error];
NSString *IsPUstring = [jsonMain objectForKey:@"IsPU"];
NSString *IsConstring = [jsonMain objectForKey:@"IsCon"];
NSLog(@"IsPUstring...%@",IsPUstring);
NSLog(@"IsConstring...%@",IsConstring);
输出:
是PU字符串... 0
IsConstring... 1
我的问题:
原始标签值:
“IsCon”:真,“IsPU”:假
但是在 JSON 序列化之后它变成了 0 和 1 对吧?
有什么方法可以在这里获得我的原始值,例如 true 或 false ?