Answers for "swift convert dictionary to json"

1

swift convert dictionary to json

let dic = ["2": "B", "1": "A", "3": "C"]
let encoder = JSONEncoder()
if let jsonData = try? encoder.encode(dic) {
    if let jsonString = String(data: jsonData, encoding: .utf8) {
        print(jsonString)
    }
}
Posted by: Guest on January-29-2020
1

convert dictionary to json serialization swift 4

["A":123, "B":455]
Posted by: Guest on May-18-2020
0

swift convert dictionary to json

["currency": "INR", "name": "Ekluvya", "amount": 120000.0, "notes": ["boardId": "61591e494e7cd84598b0be07", "isNonAcademicCourse": true, "courseId": "615a8ec416684544d7754f5c", "user_id": "6167e8534e21a3eb921bd616", "classId": "61591dae4e7cd84598b0be04"], "theme": ["color": "#FF6700"], "image": <UIImage:0x600002634990 named(main: app_Sign) {29.333333333333332, 32}>, "prefill": ["contact": "9992921199", "email": "[email protected]"]]
Posted by: Guest on October-15-2021
0

swift convert dictionary to json

["A":34,"B":56]
Posted by: Guest on September-08-2021

Code answers related to "swift convert dictionary to json"

Code answers related to "Swift"

Browse Popular Code Answers by Language