Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[js] 第895天 JSON格式的数据需要遵循什么规则? #4505

Open
haizhilin2013 opened this issue Sep 26, 2021 · 2 comments
Open

[js] 第895天 JSON格式的数据需要遵循什么规则? #4505

haizhilin2013 opened this issue Sep 26, 2021 · 2 comments
Labels
js JavaScript

Comments

@haizhilin2013
Copy link
Collaborator

第895天 JSON格式的数据需要遵循什么规则?

#3060

3+1官网

我也要出题

@haizhilin2013 haizhilin2013 added the js JavaScript label Sep 26, 2021
@ferrinweb
Copy link

《JSON必知必会》

@WangXi01
Copy link

1.JSON文件都是被包裹在一个大括号中 {},通过key-value的方式来表达数据。
2.JSON的Key必须包裹在一个双引号中,在实践中,编写 JSON 的时候,忘了给 Key 值加双引号或者是把双引号写成单引号是常见错误。
3.JSON的值只能是几种数据格式,其他任何格式都会触发报错,例如 JavaScript 中的 undefined。
4.Null 还需要注意的是 JSON 文件中无法使用注释,试图添加注释将会引发报错。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
js JavaScript
Projects
None yet
Development

No branches or pull requests

3 participants