swift:字典转字符串

// MARK:字典转字符串

 func dicValueString(_ dic:[String : Any]) -> String?{        

    let data = try? JSONSerialization.data(withJSONObject: dic, options: [])        

    let str = String(data: data!, encoding: String.Encoding.utf8)        

    return str    

}

你可能感兴趣的:(swift:字典转字符串)