📌  相关文章
📜  快速将数组转换为 json - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:08.546000             🧑  作者: Mango

代码示例1
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)
}