swift convert array to json

Solutions on MaxInterview for swift convert array to json by the best coders in the world

showing results for - "swift convert array to json"
Camilo
14 May 2017
1func json(from object:Any) -> String? {
2    guard let data = try? JSONSerialization.data(withJSONObject: object, options: []) else {
3        return nil
4    }
5    return String(data: data, encoding: String.Encoding.utf8)
6}
queries leading to this page
swift ui array to jsonconvert json data to string array swiftcreate json from array swiftmake an array of json swiftconvert array to json array swiftswift array to jsonswift turn array into json objectsjson array to string array swiftswift json to arrayarray to json string in swift 5swift convert object array to jsonconvert list to json swiftswifty json array to jsonswift array of objects to jsonarray to json iosarray to dictionary convert json encode in swiftswift convert data to jsonconvert json to array swiftconvert array to json swiftstring array to json object in ios swiftswift get array from json using swiftyjsonconvert data to array of json swiftconvert swift array to json onlineswiftyjson json to object arrayjson array to swift stringswift 5 convert array to jsonextension convert array to json swifthow to convert string array in json swift encode swift array to jsonjson string array to array ios swiftjson convert into array swifthow to convert json object to string in swift 4convert string array into into json swiftarray as json string in swift 5convert data to array of json swift codablejson data encode to array swiftswift object array to jsonconvert array to json in swiftarray for string to json string swiftswift get array from jsonconvert any arrya into json string swiftjson object to array in swiftparse json array to object in swiftswift list object to json swift array of json to array stringarray of any to json swifthow to jsonserialization jsonobject if object is inside disctionary in swiftarray of strings to json string in swiftconvert data to arrayofjson swiftarray as json array in swift 5swift list object to json string convert array to json string swifthow to serilize array type of json in swifthow to turn swift array into jsonswift json array to string and backswift struct to jsonswift list object to json javaswift decode json arrayarray to jsonstring in swfit 5swift turn array into jsonswift json array to stringarray to json swiftconverting json to array in swiftswift list of object to json stringconvert json string to array of strings swifthow to convert array of object in json swiftprint array as json swift 4mac swift parse jsonswift parse string array to json stringjson to array of string in swiftprint array in json format swifthow to array data convert to json encode in swiftswift convert array to jsonarray to json object swiftmake json array swiftarray to json array in swift 5how to convert array into json in swift using swiftyjsonjsonserialization swift to stringswift encode array into json objectarray of json to array of object swifthow to convert json data into array in swiftswift convert array to json