跳到主要内容

Appendix A. Changes from RFC 4627 (附录 A. 相对 RFC 4627 的变更)

本节列出本文档与 RFC 4627 文本之间的变更.

  • 更改了文档的标题和摘要.

  • 将对 [UNICODE] 的引用改为不指定具体版本.

  • 添加了 "Specifications of JSON" 一节.

  • 添加了 "Introduction to This Revision" 一节.

  • 更改了 "JSON text" 的定义, 使其可以是任何 JSON value (JSON 值), 移除了它必须是 object (对象) 或 array (数组) 的约束.

  • 添加了关于重复 object member name (对象成员名称), member ordering (成员顺序) 和 interoperability (互操作性) 的文字.

  • 澄清不要求 array 中的 value 属于同一种 JSON type (JSON 类型).

  • 应用了 RFC 4627 的 erratum #607, 以正确对齐 "object" 定义的 artwork.

  • 在 "Numbers" 一节中将 "as sequences of digits" 改为 "in the grammar below", 并明确指出使用 base 10.

  • 添加了关于作为 IEEE754 函数的 number 互操作性的文字, 并添加了 IEEE754 引用.

  • 添加了关于互操作性, Unicode character (Unicode 字符) 和 string comparison (字符串比较) 的文字. 为此, 将旧的 "Encoding" 一节改为 "String and Character Issues" 一节, 包含三个子节: "Character Encoding", "Unicode Characters", and "String Comparison".

  • 更改了 "Parsers" 一节中的指导, 指出实现可以对 number 的范围 "and precision" 设置限制.

  • 更新并整理了 "IANA Considerations" 一节.

  • 创建了真正的 "Security Considerations" 一节, 并将文本从之前的 "IANA Considerations" 一节中移出.

  • 通过删除以 "A JSON text can be safely passed" 开头的安全考虑以及随附的 JavaScript 代码, 应用了 RFC 4627 的 erratum #3607.

  • 在 "Security Considerations" 一节中添加了一条注释, 指出在 JavaScript 或任何其他 JSON text 符合其语法的语言中使用 "eval()" 函数的风险.

  • 在 "IANA Considerations" 中添加了一条注释, 澄清 application/json media type 没有 "charset" 参数.

  • 在第一个示例中将 "100" 改为 100, 并添加了一个 boolean (布尔) 字段.

  • 添加了包含简单 value 的 JSON text 示例, 这些 value 既不是 object 也不是 array.

  • 添加了 "Contributors" 一节, 向 Douglas Crockford 致谢.

  • 添加了对 RFC 4627 的引用.

  • 将 ECMAScript 引用从 Normative 移至 Informative, 更新为引用 ECMAScript 5.1, 并添加了对 ECMA 404 的引用.