0

i want to pass json string in AFNetworking i am using the code below to parse the data to the server.

My JSON String :

{"Queries":[{"Field":"text_all","Value":"Class1","IsPhrase":false,"Near":0}],"Filter":[{"Key":"Test","Value":["Test","Test2"]}],"Paging":0,"Count":10}

Code:

AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
manager.requestSerializer = [AFJSONRequestSerializer serializer];
 manager.responseSerializer = [AFHTTPResponseSerializer serializer];
      manager.requestSerializer = [AFJSONRequestSerializer serializer];
        [manager POST:@“http://www.test.com” parameters:main_dict success:^(AFHTTPRequestOperation *operation, id responseObject)
         {

            NSLog(@"responseString: %@", json);

        }
             failure:^(AFHTTPRequestOperation *operation, NSError *error)
         {

         }];
rmaddy
  • 314,917
  • 42
  • 532
  • 579
  • Possible duplicate of http://stackoverflow.com/questions/21487184/posting-json-data-using-afnetworking-2-0 – danh Sep 05 '14 at 18:35
  • @danh thanks for your replay but i am using the same code as given your link but its not work for me. – Rushabh Sep 06 '14 at 10:21

0 Answers0