0

how to post below data with Alamofire

[{
                OrgId: 1001,
                ClassworkId: 999800580,
                UniqueText: '',
                FullFileName: 'download.jpg',
            }, {
                OrgId: 1001,
                ClassworkId: 0,
                UniqueText: 'abc-126',
                FullFileName: 'download (1).jpg',
            }]

i want to pass this data in JSON format.i am using SwiftJson.

ZetrixWeb
  • 47
  • 1
  • 8
  • The problem is that Alamofire expects a top level dictionary, not an array. So you have to encode it yourself if you absolutely must send it as an array. See http://stackoverflow.com/a/27027253/1271826. Or perhaps change your server so this array is wrapped within a dictionary, which simplifies your code. – Rob Sep 07 '16 at 13:14
  • @Rob Crap ! Thats really bad, had not seen that earlier ... – GoodSp33d Sep 07 '16 at 13:25

0 Answers0