gpt4 book ai didi

ios - Alamofire 请求在响应 JSON 中带有重音字符串

转载 作者:行者123 更新时间:2023-11-30 13:05:23 25 4
gpt4 key购买 nike

我使用以下代码发出请求:

Alamofire.request(.GET, url).responseJSON { (response) in
switch response.result{
case .Success(let JSON):
print (JSON as! NSDictionary)

回复是:

   {
guardado = {
email = "xxxxgopy@hotmail.com";
id = 9552;
name = "luz stella gonz\U00c3\U00a1lez";
pwd = "*******";
};
}

如何处理 unicode 字符\U00c3\U00a1。

当我尝试从 String var 中的 name key 分配值时,我收到以下消息:luz stella gonzález。但它可能是luz stella gonzález

最佳答案

    let dictonary = ["email":"xxxxgopy@hotmail.com","id":9552,"pwd" :"*******","name":"luz stella gonz\u{00E1}lez"]
print(dictonary)
/* {
email = "xxxxgopy@hotmail.com";
id = 9552;
name = "luz stella gonzález";
pwd = "*******";
}*/

编码错误...

关于ios - Alamofire 请求在响应 JSON 中带有重音字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39444104/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com