Nital
Nital

Reputation: 6084

How to convert JSON into XML in Swift?

I have a JSON body that I sending over HTTP using POST. Instead of sending JSON as payload I would like to convert it to XML and send it over. How can I achieve this in Swift?

I am a newbie in Swift and hence does not have much idea. I googled around but could not find anything specifically for converting JSON to XML.

Please guide.

Upvotes: 1

Views: 1453

Answers (1)

Danny Narváez
Danny Narváez

Reputation: 576

You could combine two libraries, use SwiftyJSON to parse JSON and then AEXML to convert it into XML. Read the Docs, it's an easy approach.

Upvotes: 1

Related Questions