gpt4 book ai didi

ios - 从调试器打印时,为什么有些字典键有引号而有些没有?

转载 作者:可可西里 更新时间:2023-11-01 05:37:16 26 4
gpt4 key购买 nike

所以我目前正在从我的服务器发回一个 JSON 对象。如果我在 XCode 中打印 responseObject,我会得到以下信息:

Printing description of responseObject:
{
order = 3;
"picture_bucket_name" = test;
"picture_creation_date" = "2013-01-06T21:49:54.546Z";
"picture_identifier" = 61;
"picture_url_with_bucket" = "test/pictures/sop/steps/test_default_320_320.png";
"sub_order" = 0;
}

为什么 Order 键不在 ""中?这是唯一带有数字的键,我必须使用 NumberFormatter 从 NSString 转换为 NSNumber。这是为什么?

最佳答案

通常情况下,一个没有任何空格的单词和其他特殊字符在字典键的控制台中显示时没有任何引号。例如:- 上例中的键 order 和值 test。这有助于保持可读性。将这些其他词用引号引起来确保可读性。

关于ios - 从调试器打印时,为什么有些字典键有引号而有些没有?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14187201/

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