Video tutorial
视频教程
Common JSON mistakes
JSON 常见错误
- Trailing comma — JSON does not allow commas after the last item.
- 尾随逗号 —— JSON 不允许最后一个元素后有逗号。
- Single quotes — JSON requires double quotes for keys and string values.
- 单引号 —— 键和字符串值必须用双引号。
- Comments — JSON does not support comments. Remove all
//and/* */. - 注释 —— JSON 不支持注释。删除所有
//和/* */。 - Undefined / NaN — these JavaScript values are not valid JSON. Use
nullinstead. - undefined / NaN —— 这两个 JavaScript 值不是合法 JSON,请用
null。