Description of NSDictionary - why are some key nam

2019-02-17 12:55发布

i used a simple NSLog on a dictionary

NSLog(@"dict %@", dictionary); 

the result i got was

...
"first_name" = Peter;
gender = male;
id = 1171548848;
"last_name" = Lapisu;
...

why are some key names in "quotes" and some not?

1条回答
叼着烟拽天下
2楼-- · 2019-02-17 13:25

When the string has characters apart from alphabets + numerics, it will quote the string. Its basic methodology of description function.

查看更多
登录 后发表回答