1

I'm developing an iOS app and need to make an Post request with a json object that looks like this:

{
  "id": 30645,
  "obj1": [
    {
      "id": 21649,
      "comment":"Lorem ipsum dolor sit amet,",
      "obj2": [
        {
          "id": 42070,
          "comment": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum lacinia, urna sed gravida fringilla, elit",
          "obj3": [
            {
              "id": 518964,
              "active": false
            }
          ],
          "images": [UImage, UIImage, UIImage]
        }
      ],
      "status": 1
    }
  ]
}

My question is: what is the best way to do this?

EDIT:

The issue is the array of UIImage, what can i do with that? Transform to base64 or use the multipart solution that Alamofire provides?

Thanks for your time.

P.D. I'm using Alamofire 4.0 and Swift 3

0 Answers0