Answers for "swift json convert array values to json object"

-1

swift convert array to json

func json(from object:Any) -> String? {
    guard let data = try? JSONSerialization.data(withJSONObject: object, options: []) else {
        return nil
    }
    return String(data: data, encoding: String.Encoding.utf8)
}
Posted by: Guest on June-13-2020

Code answers related to "swift json convert array values to json object"

Code answers related to "Swift"

Browse Popular Code Answers by Language