how to create json in objective-c

后端 未结 6 1430
眼角桃花
眼角桃花 2020-12-31 04:19
NSData* jsonDataToSendTheServer;

NSDictionary *setUser = [NSDictionary
            dictionaryWithObjectsAndKeys:[@\"u\" stringByAppendingString:my.id],@\"id\",
             


        
6条回答
  •  执念已碎
    2020-12-31 04:48

    NSDictionary *jsonObject = @{
                                     @"a":@[
                    @{
                                                 @"title1”:@“AA”,
                                                 @"title2” : @“BB”,
                                                 @"subcats" : @[
                                                         @{
                                                             @"title1” : @“CC”,
                                                             @"title2” :@“DD”
                                                             }
    
                                                         ]
    
                                                 }
                                             ]
    
    
    
                                     };
    

提交回复
热议问题