我正在开发iPhone应用程序。在这里,我尝试使用以下代码发布我的数据:
NSDictionary *contactData = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInt:score] ,@"score",
[NSNumber numberWithInt:game_id] ,@"game_id",
game_version ,@"game_version",
platform ,@"platform",
[NSNumber numberWithInt:timestamp] ,@"timestamp",
[NSNumber numberWithInt:elapsed_time] ,@"elapsed_time",
hash ,@"hash",
[NSNumber numberWithInt:level_reached] ,@"level_reached",
verification ,@"verification",
nil];
[request1 addPostValue:contactData forKey:@"plays[]"];
我想生成以下格式:
Array
(
[plays] => Array
(
[0] => Array
(
[score] = 513956
[game_id] = 1
[game_version] = 1.0
[platform] = Web
[timestamp] = 1313146039
[elapsed_time] = 400
[hash] = 61e51000143566bfddjfhdeur88cb7b2ad
[level_reached] = 5
[verification] = e56a35341c7854dref82ad678cb11593
)
)
[module] => play
[action] => save
)
如何在必须进行更改或我犯错误的地方实施。 请帮我。我被困在那。