draft-ietf-jsonbis-rfc7159bis-03.txt | draft-ietf-jsonbis-rfc7159bis-latest.txt | |||
---|---|---|---|---|
JSON Working Group T. Bray, Ed. | JSON Working Group T. Bray, Ed. | |||
Internet-Draft Textuality | Internet-Draft Textuality | |||
Obsoletes: 4627, 7158, 7159 (if February 19, 2017 | Obsoletes: 7159 (if approved) July 18, 2017 | |||
approved) | ||||
Intended status: Standards Track | Intended status: Standards Track | |||
Expires: August 23, 2017 | Expires: January 19, 2018 | |||
The JavaScript Object Notation (JSON) Data Interchange Format | The JavaScript Object Notation (JSON) Data Interchange Format | |||
draft-ietf-jsonbis-rfc7159bis-03 | draft-ietf-jsonbis-rfc7159bis-latest | |||
Abstract | Abstract | |||
JavaScript Object Notation (JSON) is a lightweight, text-based, | JavaScript Object Notation (JSON) is a lightweight, text-based, | |||
language-independent data interchange format. It was derived from | language-independent data interchange format. It was derived from | |||
the ECMAScript Programming Language Standard. JSON defines a small | the ECMAScript Programming Language Standard. JSON defines a small | |||
set of formatting rules for the portable representation of structured | set of formatting rules for the portable representation of structured | |||
data. | data. | |||
This document removes inconsistencies with other specifications of | This document removes inconsistencies with other specifications of | |||
skipping to change at page 1, line 40 ¶ | skipping to change at page 1, line 39 ¶ | |||
Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
Task Force (IETF). Note that other groups may also distribute | Task Force (IETF). Note that other groups may also distribute | |||
working documents as Internet-Drafts. The list of current Internet- | working documents as Internet-Drafts. The list of current Internet- | |||
Drafts is at http://datatracker.ietf.org/drafts/current/. | Drafts is at http://datatracker.ietf.org/drafts/current/. | |||
Internet-Drafts are draft documents valid for a maximum of six months | Internet-Drafts are draft documents valid for a maximum of six months | |||
and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
This Internet-Draft will expire on August 23, 2017. | This Internet-Draft will expire on January 19, 2018. | |||
Copyright Notice | Copyright Notice | |||
Copyright (c) 2017 IETF Trust and the persons identified as the | Copyright (c) 2017 IETF Trust and the persons identified as the | |||
document authors. All rights reserved. | document authors. All rights reserved. | |||
This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
Provisions Relating to IETF Documents | Provisions Relating to IETF Documents | |||
(http://trustee.ietf.org/license-info) in effect on the date of | (http://trustee.ietf.org/license-info) in effect on the date of | |||
publication of this document. Please review these documents | publication of this document. Please review these documents | |||
skipping to change at page 2, line 46 ¶ | skipping to change at page 2, line 45 ¶ | |||
8.1. Character Encoding . . . . . . . . . . . . . . . . . . . 8 | 8.1. Character Encoding . . . . . . . . . . . . . . . . . . . 8 | |||
8.2. Unicode Characters . . . . . . . . . . . . . . . . . . . 9 | 8.2. Unicode Characters . . . . . . . . . . . . . . . . . . . 9 | |||
8.3. String Comparison . . . . . . . . . . . . . . . . . . . . 9 | 8.3. String Comparison . . . . . . . . . . . . . . . . . . . . 9 | |||
9. Parsers . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 | 9. Parsers . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 | |||
10. Generators . . . . . . . . . . . . . . . . . . . . . . . . . 10 | 10. Generators . . . . . . . . . . . . . . . . . . . . . . . . . 10 | |||
11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 | 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 | |||
12. Security Considerations . . . . . . . . . . . . . . . . . . . 11 | 12. Security Considerations . . . . . . . . . . . . . . . . . . . 11 | |||
13. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 11 | 13. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 11 | |||
14. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 12 | 14. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 12 | |||
15. References . . . . . . . . . . . . . . . . . . . . . . . . . 12 | 15. References . . . . . . . . . . . . . . . . . . . . . . . . . 12 | |||
15.1. Normative References . . . . . . . . . . . . . . . . . . 12 | 15.1. Normative References . . . . . . . . . . . . . . . . . . 13 | |||
15.2. Informative References . . . . . . . . . . . . . . . . . 13 | 15.2. Informative References . . . . . . . . . . . . . . . . . 13 | |||
Appendix A. Changes from RFC 7159 . . . . . . . . . . . . . . . 14 | Appendix A. Changes from RFC 7159 . . . . . . . . . . . . . . . 15 | |||
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 14 | Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 15 | |||
1. Introduction | 1. Introduction | |||
JavaScript Object Notation (JSON) is a text format for the | JavaScript Object Notation (JSON) is a text format for the | |||
serialization of structured data. It is derived from the object | serialization of structured data. It is derived from the object | |||
literals of JavaScript, as defined in the ECMAScript Programming | literals of JavaScript, as defined in the ECMAScript Programming | |||
Language Standard, Third Edition [ECMA-262]. | Language Standard, Third Edition [ECMA-262]. | |||
JSON can represent four primitive types (strings, numbers, booleans, | JSON can represent four primitive types (strings, numbers, booleans, | |||
and null) and two structured types (objects and arrays). | and null) and two structured types (objects and arrays). | |||
skipping to change at page 8, line 49 ¶ | skipping to change at page 8, line 49 ¶ | |||
escape = %x5C ; \ | escape = %x5C ; \ | |||
quotation-mark = %x22 ; " | quotation-mark = %x22 ; " | |||
unescaped = %x20-21 / %x23-5B / %x5D-10FFFF | unescaped = %x20-21 / %x23-5B / %x5D-10FFFF | |||
8. String and Character Issues | 8. String and Character Issues | |||
8.1. Character Encoding | 8.1. Character Encoding | |||
JSON text SHALL be encoded in UTF-8, UTF-16, or UTF-32 [UNICODE] | When transmitting over a network protocol, or as a payload of a | |||
(Section 3). The default encoding is UTF-8, and JSON texts that are | network protocol intended to be interpreted as part of a protocol, | |||
encoded in UTF-8 are interoperable in the sense that they will be | JSON text MUST be encoded in UTF-8 (Section 3 of [UNICODE]). | |||
read successfully by the maximum number of implementations; there are | ||||
many implementations that cannot successfully read texts in other | Previous specifications of JSON have not required the use of UTF-8 | |||
encodings (such as UTF-16 and UTF-32). | when transmitting JSON text. However, the vast majority of JSON- | |||
based software implementations have chosen to use the UTF-8 encoding, | ||||
to the extent that it is the only encoding that achieves | ||||
interoperability. | ||||
Implementations MUST NOT add a byte order mark (U+FEFF) to the | Implementations MUST NOT add a byte order mark (U+FEFF) to the | |||
beginning of a JSON text. In the interests of interoperability, | beginning of a networked-transmitted JSON text. In the interests of | |||
implementations that parse JSON texts MAY ignore the presence of a | interoperability, implementations that parse JSON texts MAY ignore | |||
byte order mark rather than treating it as an error. | the presence of a byte order mark rather than treating it as an | |||
error. | ||||
8.2. Unicode Characters | 8.2. Unicode Characters | |||
When all the strings represented in a JSON text are composed entirely | When all the strings represented in a JSON text are composed entirely | |||
of Unicode characters [UNICODE] (however escaped), then that JSON | of Unicode characters [UNICODE] (however escaped), then that JSON | |||
text is interoperable in the sense that all software implementations | text is interoperable in the sense that all software implementations | |||
that parse it will agree on the contents of names and of string | that parse it will agree on the contents of names and of string | |||
values in objects and arrays. | values in objects and arrays. | |||
However, the ABNF in this specification allows member names and | However, the ABNF in this specification allows member names and | |||
skipping to change at page 13, line 31 ¶ | skipping to change at page 13, line 37 ¶ | |||
15.2. Informative References | 15.2. Informative References | |||
[ECMA-262] | [ECMA-262] | |||
Ecma International, "ECMAScript Language Specification, | Ecma International, "ECMAScript Language Specification, | |||
Third Edition", Standard ECMA-262, December 1999, | Third Edition", Standard ECMA-262, December 1999, | |||
<http://www.ecma-international.org/publications/files/ | <http://www.ecma-international.org/publications/files/ | |||
ECMA-ST-ARCH/ | ECMA-ST-ARCH/ | |||
ECMA-262,%203rd%20edition,%20December%201999.pdf>. | ECMA-262,%203rd%20edition,%20December%201999.pdf>. | |||
[Err3607] RFC Errata, "Errata ID 3607", RFC 4627, | [Err3607] RFC Errata, "Errata ID 3607", RFC 4627, <https://www.rfc- | |||
<http://www.rfc-editor.org>. | editor.org/errata/eid3607>. | |||
[Err3915] RFC Errata, "Errata ID 7159", RFC 7159, | [Err3915] RFC Errata, "Errata ID 7159", RFC 7159, <https://www.rfc- | |||
<http://www.rfc-editor.org>. | editor.org/errata/eid3915>. | |||
[Err4264] RFC Errata, "Errata ID 7159", RFC 7159, | [Err4264] RFC Errata, "Errata ID 7159", RFC 7159, <https://www.rfc- | |||
<http://www.rfc-editor.org>. | editor.org/errata/eid4264>. | |||
[Err4336] RFC Errata, "Errata ID 7159", RFC 7159, | [Err4336] RFC Errata, "Errata ID 7159", RFC 7159, <https://www.rfc- | |||
<http://www.rfc-editor.org>. | editor.org/errata/eid4336>. | |||
[Err607] RFC Errata, "Errata ID 607", RFC 4627, | [Err607] RFC Errata, "Errata ID 607", RFC 4627, <https://www.rfc- | |||
<http://www.rfc-editor.org>. | editor.org/errata/eid607>. | |||
[RFC4627] Crockford, D., "The application/json Media Type for | [RFC4627] Crockford, D., "The application/json Media Type for | |||
JavaScript Object Notation (JSON)", RFC 4627, | JavaScript Object Notation (JSON)", RFC 4627, | |||
DOI 10.17487/RFC4627, July 2006, | DOI 10.17487/RFC4627, July 2006, | |||
<http://www.rfc-editor.org/info/rfc4627>. | <http://www.rfc-editor.org/info/rfc4627>. | |||
Appendix A. Changes from RFC 7159 | Appendix A. Changes from RFC 7159 | |||
This section lists changes between this document and the text in RFC | This section lists changes between this document and the text in RFC | |||
RFC7159. | RFC7159. | |||
o Section 1.2 has been updated to reflect the removal of a JSON | o Section 1.2 has been updated to reflect the removal of a JSON | |||
specification from ECMA-262, to make the reference to ECMA-404 | specification from ECMA-262, to make the reference to ECMA-404 | |||
normative, and to explain the particular meaning of "normative". | normative, and to explain the particular meaning of "normative". | |||
o Section 1.3 has been updated to reflect errata filed against | o Section 1.3 has been updated to reflect errata filed against | |||
RFC7159, not RFC4627. | RFC7159, not RFC4627. | |||
o Section 8.1 was changed to require the use of UTF-8 when | ||||
transmitted over a network. | ||||
o Section 12 has been updated to increase the precision of the | o Section 12 has been updated to increase the precision of the | |||
description of the security risk that follows from using the | description of the security risk that follows from using the | |||
ECMAScript "eval()" function. | ECMAScript "eval()" function. | |||
o Section 15.1 has been updated to include ECMA 404 as a normative | o Section 15.1 has been updated to include ECMA 404 as a normative | |||
reference. | reference. | |||
o Section 15.2 has been updated to remove ECMA 404, update the | o Section 15.2 has been updated to remove ECMA 404, update the | |||
version of ECMA-262, and refresh the errata list. | version of ECMA-262, and refresh the errata list. | |||
End of changes. 14 change blocks. | ||||
27 lines changed or deleted | 33 lines changed or added | |||
This html diff was produced by rfcdiff 1.44jr. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |