How to convert JSON to String in ios Swift?

后端 未结 7 1772
孤独总比滥情好
孤独总比滥情好 2020-12-15 16:30

Here is the code for the below Json output:

let params : [[String : AnyObject]]  = [[\"name\" : \"action\", \"value\" : \"pay\" ],[\"name\" : \"cartJsonData\         


        
相关标签:
7条回答
  • 2020-12-15 17:06

    A simple way to convert a JSON object to a String is: 1. First create a JSON subscript value e.g. jsonObject["fieldName"] 2. Use the '.stringValue' property to retrieve the actually String equivalence (jsonObject["fieldName"].stringValue)

    0 讨论(0)
提交回复
热议问题