「ios開発」NSDictionaryを利用して多重ネストされたjson文字列をスプライス

サンプルコード:
NSDictionary *dataDictionary= [NSDictionary dictionaryWithObjectsAndKeys:mac,@"mac",
game,@"game",
devicetoken,@"devicetoken",
device,@"device",
gv,@"gv",
lang,@"lang",
os,@"os",
hardware,@"hardware",
down,@"down",nil];
NSDictionary *parmDictionary= [NSDictionary dictionaryWithObjectsAndKeys:@"getSession",@"act",
dataDictionary,@"data",nil];
NSDictionary *jsonDictionary=[NSDictionary dictionaryWithObjectsAndKeys:pv,@"pv",
parmDictionary,@"param",nil];
SBJsonWriter *writer = [[SBJsonWriter alloc] init];

NSString *jsonString=nil;
jsonString=[writer stringWithObject:jsonDictionary];
NSLog(@"%@",jsonString);

IOS

Posted by arkgame