draft-reschke-http-jfv-14.txt | draft-reschke-http-jfv-latest.txt | |||
---|---|---|---|---|
Network Working Group J. F. Reschke | Network Working Group J. F. Reschke | |||
Internet-Draft greenbytes | Internet-Draft greenbytes | |||
Intended status: Informational April 22, 2021 | Intended status: Informational July 6, 2024 | |||
Expires: October 24, 2021 | Expires: January 7, 2025 | |||
A JSON Encoding for HTTP Field Values | A JSON Encoding for HTTP Field Values | |||
draft-reschke-http-jfv-14 | draft-reschke-http-jfv-latest | |||
Abstract | Abstract | |||
This document establishes a convention for use of JSON-encoded field | This document establishes a convention for use of JSON-encoded field | |||
values in new HTTP fields. | values in new HTTP fields. | |||
Editorial Note | Editorial Note | |||
This note is to be removed before publishing as an RFC. | This note is to be removed before publishing as an RFC. | |||
skipping to change at page 1, line 34 ¶ | skipping to change at page 1, line 34 ¶ | |||
sending a message with subject "subscribe" to ietf-http-wg- | sending a message with subject "subscribe" to ietf-http-wg- | |||
request@w3.org (mailto:ietf-http-wg- | request@w3.org (mailto:ietf-http-wg- | |||
request@w3.org?subject=subscribe). | request@w3.org?subject=subscribe). | |||
Discussions of the HTTPbis Working Group are archived at | Discussions of the HTTPbis Working Group are archived at | |||
<http://lists.w3.org/Archives/Public/ietf-http-wg/>. | <http://lists.w3.org/Archives/Public/ietf-http-wg/>. | |||
XML versions and latest edits for this document are available from | XML versions and latest edits for this document are available from | |||
<http://greenbytes.de/tech/webdav/#draft-reschke-http-jfv>. | <http://greenbytes.de/tech/webdav/#draft-reschke-http-jfv>. | |||
The changes in this draft are summarized in Appendix D.17. | The changes in this draft are summarized in Appendix D.18. | |||
Status of This Memo | Status of This Memo | |||
This Internet-Draft is submitted in full conformance with the | This Internet-Draft is submitted in full conformance with the | |||
provisions of BCP 78 and BCP 79. | provisions of BCP 78 and BCP 79. | |||
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 https://datatracker.ietf.org/drafts/current/. | Drafts is at https://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 October 24, 2021. | This Internet-Draft will expire on January 7, 2025. | |||
Copyright Notice | Copyright Notice | |||
Copyright (c) 2021 IETF Trust and the persons identified as the | Copyright (c) 2024 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 (https://trustee.ietf.org/ | Provisions Relating to IETF Documents (https://trustee.ietf.org/ | |||
license-info) in effect on the date of publication of this document. | license-info) in effect on the date of publication of this document. | |||
Please review these documents carefully, as they describe your rights | Please review these documents carefully, as they describe your rights | |||
and restrictions with respect to this document. Code Components | and restrictions with respect to this document. Code Components | |||
extracted from this document must include Revised BSD License text as | extracted from this document must include Revised BSD License text as | |||
described in Section 4.e of the Trust Legal Provisions and are | described in Section 4.e of the Trust Legal Provisions and are | |||
provided without warranty as described in the Revised BSD License. | provided without warranty as described in the Revised BSD License. | |||
Table of Contents | Table of Contents | |||
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 | |||
1.1. Relation to "Structured Field Values for HTTP" | 1.1. Relation to "Structured Field Values for HTTP" | |||
(RFC8941) . . . . . . . . . . . . . . . . . . . . . . . . 4 | (RFC8941bis) . . . . . . . . . . . . . . . . . . . . . . 4 | |||
2. Data Model and Format . . . . . . . . . . . . . . . . . . . . 4 | 2. Data Model and Format . . . . . . . . . . . . . . . . . . . . 4 | |||
3. Sender Requirements . . . . . . . . . . . . . . . . . . . . . 5 | 3. Sender Requirements . . . . . . . . . . . . . . . . . . . . . 5 | |||
3.1. Example . . . . . . . . . . . . . . . . . . . . . . . . . 5 | 3.1. Example . . . . . . . . . . . . . . . . . . . . . . . . . 5 | |||
4. Recipient Requirements . . . . . . . . . . . . . . . . . . . 6 | 4. Recipient Requirements . . . . . . . . . . . . . . . . . . . 6 | |||
4.1. Example . . . . . . . . . . . . . . . . . . . . . . . . . 6 | 4.1. Example . . . . . . . . . . . . . . . . . . . . . . . . . 6 | |||
5. Using this Format in Field Definitions . . . . . . . . . . . 7 | 5. Using this Format in Field Definitions . . . . . . . . . . . 7 | |||
6. Deployment Considerations . . . . . . . . . . . . . . . . . . 7 | 6. Deployment Considerations . . . . . . . . . . . . . . . . . . 7 | |||
7. Interoperability Considerations . . . . . . . . . . . . . . . 7 | 7. Interoperability Considerations . . . . . . . . . . . . . . . 7 | |||
7.1. Encoding and Characters . . . . . . . . . . . . . . . . . 7 | 7.1. Encoding and Characters . . . . . . . . . . . . . . . . . 7 | |||
7.2. Numbers . . . . . . . . . . . . . . . . . . . . . . . . . 8 | 7.2. Numbers . . . . . . . . . . . . . . . . . . . . . . . . . 8 | |||
7.3. Object Constraints . . . . . . . . . . . . . . . . . . . 8 | 7.3. Object Constraints . . . . . . . . . . . . . . . . . . . 8 | |||
8. Internationalization Considerations . . . . . . . . . . . . . 8 | 8. Internationalization Considerations . . . . . . . . . . . . . 8 | |||
9. Security Considerations . . . . . . . . . . . . . . . . . . . 8 | 9. Security Considerations . . . . . . . . . . . . . . . . . . . 8 | |||
10. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 | 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 | |||
10.1. Normative References . . . . . . . . . . . . . . . . . . 9 | 10.1. Normative References . . . . . . . . . . . . . . . . . . 9 | |||
10.2. Informative References . . . . . . . . . . . . . . . . . 9 | 10.2. Informative References . . . . . . . . . . . . . . . . . 9 | |||
10.3. Specifications Using This Syntax (at some point of | 10.3. Specifications Using This Syntax (at some point of | |||
time) . . . . . . . . . . . . . . . . . . . . . . . . . 10 | time) . . . . . . . . . . . . . . . . . . . . . . . . . 10 | |||
Appendix A. Comparison with Structured Fields . . . . . . . . . 10 | Appendix A. Comparison with Structured Fields . . . . . . . . . 10 | |||
A.1. Base Types . . . . . . . . . . . . . . . . . . . . . . . 10 | A.1. Base Types . . . . . . . . . . . . . . . . . . . . . . . 11 | |||
A.2. Structures . . . . . . . . . . . . . . . . . . . . . . . 11 | A.2. Structures . . . . . . . . . . . . . . . . . . . . . . . 11 | |||
Appendix B. Use of JSON Field Value Encoding in the Wild . . . . 11 | Appendix B. Use of JSON Field Value Encoding in the Wild . . . . 12 | |||
B.1. W3C Reporting API Specification . . . . . . . . . . . . . 12 | B.1. W3C Reporting API Specification . . . . . . . . . . . . . 12 | |||
B.2. W3C Clear Site Data Specification . . . . . . . . . . . . 12 | B.2. W3C Clear Site Data Specification . . . . . . . . . . . . 12 | |||
B.3. W3C Feature Policy Specification . . . . . . . . . . . . 12 | B.3. W3C Feature Policy Specification . . . . . . . . . . . . 12 | |||
Appendix C. Implementations . . . . . . . . . . . . . . . . . . 12 | Appendix C. Implementations . . . . . . . . . . . . . . . . . . 12 | |||
Appendix D. Change Log . . . . . . . . . . . . . . . . . . . . . 12 | Appendix D. Change Log . . . . . . . . . . . . . . . . . . . . . 13 | |||
D.1. Since draft-reschke-http-jfv-00 . . . . . . . . . . . . . 12 | D.1. Since draft-reschke-http-jfv-00 . . . . . . . . . . . . . 13 | |||
D.2. Since draft-reschke-http-jfv-01 . . . . . . . . . . . . . 12 | D.2. Since draft-reschke-http-jfv-01 . . . . . . . . . . . . . 13 | |||
D.3. Since draft-reschke-http-jfv-02 . . . . . . . . . . . . . 12 | D.3. Since draft-reschke-http-jfv-02 . . . . . . . . . . . . . 13 | |||
D.4. Since draft-reschke-http-jfv-03 . . . . . . . . . . . . . 13 | D.4. Since draft-reschke-http-jfv-03 . . . . . . . . . . . . . 13 | |||
D.5. Since draft-reschke-http-jfv-04 . . . . . . . . . . . . . 13 | D.5. Since draft-reschke-http-jfv-04 . . . . . . . . . . . . . 13 | |||
D.6. Since draft-ietf-httpbis-jfv-00 . . . . . . . . . . . . . 13 | D.6. Since draft-ietf-httpbis-jfv-00 . . . . . . . . . . . . . 13 | |||
D.7. Since draft-ietf-httpbis-jfv-01 . . . . . . . . . . . . . 13 | D.7. Since draft-ietf-httpbis-jfv-01 . . . . . . . . . . . . . 13 | |||
D.8. Since draft-ietf-httpbis-jfv-02 . . . . . . . . . . . . . 13 | D.8. Since draft-ietf-httpbis-jfv-02 . . . . . . . . . . . . . 14 | |||
D.9. Since draft-reschke-http-jfv-05 . . . . . . . . . . . . . 13 | D.9. Since draft-reschke-http-jfv-05 . . . . . . . . . . . . . 14 | |||
D.10. Since draft-reschke-http-jfv-06 . . . . . . . . . . . . . 13 | D.10. Since draft-reschke-http-jfv-06 . . . . . . . . . . . . . 14 | |||
D.11. Since draft-reschke-http-jfv-07 . . . . . . . . . . . . . 13 | D.11. Since draft-reschke-http-jfv-07 . . . . . . . . . . . . . 14 | |||
D.12. Since draft-reschke-http-jfv-08 . . . . . . . . . . . . . 14 | D.12. Since draft-reschke-http-jfv-08 . . . . . . . . . . . . . 14 | |||
D.13. Since draft-reschke-http-jfv-09 . . . . . . . . . . . . . 14 | D.13. Since draft-reschke-http-jfv-09 . . . . . . . . . . . . . 14 | |||
D.14. Since draft-reschke-http-jfv-10 . . . . . . . . . . . . . 14 | D.14. Since draft-reschke-http-jfv-10 . . . . . . . . . . . . . 14 | |||
D.15. Since draft-reschke-http-jfv-11 . . . . . . . . . . . . . 14 | D.15. Since draft-reschke-http-jfv-11 . . . . . . . . . . . . . 14 | |||
D.16. Since draft-reschke-http-jfv-12 . . . . . . . . . . . . . 14 | D.16. Since draft-reschke-http-jfv-12 . . . . . . . . . . . . . 15 | |||
D.17. Since draft-reschke-http-jfv-13 . . . . . . . . . . . . . 14 | D.17. Since draft-reschke-http-jfv-13 . . . . . . . . . . . . . 15 | |||
D.18. Since draft-reschke-http-jfv-14 . . . . . . . . . . . . . 15 | ||||
D.19. Since draft-reschke-http-jfv-15 . . . . . . . . . . . . . 15 | ||||
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 15 | Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 15 | |||
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 15 | Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 16 | |||
1. Introduction | 1. Introduction | |||
Defining syntax for new HTTP fields ([HTTP], Section 5) is non- | Defining syntax for new HTTP fields ([HTTP], Section 5) is non- | |||
trivial. Among the commonly encountered problems are: | trivial. Among the commonly encountered problems are: | |||
o There is no common syntax for complex field values. Several well- | o There is no common syntax for complex field values. Several well- | |||
known fields do use a similarly looking syntax, but it is hard to | known fields do use a similarly looking syntax, but it is hard to | |||
write generic parsing code that will both correctly handle valid | write generic parsing code that will both correctly handle valid | |||
field values but also reject invalid ones. | field values but also reject invalid ones. | |||
skipping to change at page 4, line 15 ¶ | skipping to change at page 4, line 15 ¶ | |||
a generic JSON-based ([RFC8259]) data model and a concrete wire | a generic JSON-based ([RFC8259]) data model and a concrete wire | |||
format that can be used in definitions of new fields, where the goals | format that can be used in definitions of new fields, where the goals | |||
were: | were: | |||
o to be compatible with field recombination when field lines occur | o to be compatible with field recombination when field lines occur | |||
multiple times in a single message (Section 5.3 of [HTTP]), and | multiple times in a single message (Section 5.3 of [HTTP]), and | |||
o not to use any problematic characters in the field value (non- | o not to use any problematic characters in the field value (non- | |||
ASCII characters and certain whitespace characters). | ASCII characters and certain whitespace characters). | |||
1.1. Relation to "Structured Field Values for HTTP" ([RFC8941]) | 1.1. Relation to "Structured Field Values for HTTP" ([RFC8941bis]) | |||
"Structured Field Values for HTTP", an IETF RFC on the Standards | "Structured Field Values for HTTP", an IETF RFC on the Standards | |||
Track, is a different approach to this set of problems. It uses a | Track, is a different approach to this set of problems. It uses a | |||
more compact notation, similar to what is used in existing header | more compact notation, similar to what is used in existing header | |||
fields, and avoids several potential interoperability problems | fields, and avoids several potential interoperability problems | |||
inherent to the use of JSON. | inherent to the use of JSON. | |||
In general, that format is preferred for newly defined fields. The | In general, that format is preferred for newly defined fields. The | |||
JSON-based format defined by this document might however be useful in | JSON-based format defined by this document might however be useful in | |||
case the data that needs to be transferred is already in JSON format, | case the data that needs to be transferred is already in JSON format, | |||
skipping to change at page 9, line 15 ¶ | skipping to change at page 9, line 15 ¶ | |||
Other than that, any syntax that makes extensions easy can be used to | Other than that, any syntax that makes extensions easy can be used to | |||
smuggle information through field values; however, this concern is | smuggle information through field values; however, this concern is | |||
shared with other widely used formats, such as those using parameters | shared with other widely used formats, such as those using parameters | |||
in the form of name/value pairs. | in the form of name/value pairs. | |||
10. References | 10. References | |||
10.1. Normative References | 10.1. Normative References | |||
[HTTP] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, | [HTTP] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, | |||
Ed., "HTTP Semantics", Work in Progress, Internet-Draft, | Ed., "HTTP Semantics", RFC 9110, DOI 10.17487/RFC9110, | |||
draft-ietf-httpbis-semantics-15, March 30, 2021, | June 2022, <https://www.rfc-editor.org/info/rfc9110>. | |||
<https://datatracker.ietf.org/doc/html/draft-ietf-httpbis- | ||||
semantics-15>. | ||||
[RFC0020] Cerf, V., "ASCII format for network interchange", STD 80, | [RFC0020] Cerf, V., "ASCII format for network interchange", STD 80, | |||
RFC 20, DOI 10.17487/RFC0020, October 1969, | RFC 20, DOI 10.17487/RFC0020, October 1969, | |||
<https://www.rfc-editor.org/info/rfc20>. | <https://www.rfc-editor.org/info/rfc20>. | |||
[RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax | [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax | |||
Specifications: ABNF", STD 68, RFC 5234, | Specifications: ABNF", STD 68, RFC 5234, | |||
DOI 10.17487/RFC5234, January 2008, | DOI 10.17487/RFC5234, January 2008, | |||
<https://www.rfc-editor.org/info/rfc5234>. | <https://www.rfc-editor.org/info/rfc5234>. | |||
skipping to change at page 10, line 10 ¶ | skipping to change at page 10, line 10 ¶ | |||
International Organization for Standardization, | International Organization for Standardization, | |||
"Information technology -- 8-bit single-byte coded graphic | "Information technology -- 8-bit single-byte coded graphic | |||
character sets -- Part 1: Latin alphabet No. 1", ISO/ | character sets -- Part 1: Latin alphabet No. 1", ISO/ | |||
IEC 8859-1:1998, 1998. | IEC 8859-1:1998, 1998. | |||
[RFC6365] Hoffman, P. and J. Klensin, "Terminology Used in | [RFC6365] Hoffman, P. and J. Klensin, "Terminology Used in | |||
Internationalization in the IETF", BCP 166, RFC 6365, | Internationalization in the IETF", BCP 166, RFC 6365, | |||
DOI 10.17487/RFC6365, September 2011, | DOI 10.17487/RFC6365, September 2011, | |||
<https://www.rfc-editor.org/info/rfc6365>. | <https://www.rfc-editor.org/info/rfc6365>. | |||
[RFC8941] Nottingham, M. and P-H. Kamp, "Structured Field Values for | [RFC8941bis] | |||
HTTP", RFC 8941, DOI 10.17487/RFC8941, February 2021, | Nottingham, M. and P.-H. Kamp, "Structured Field Values | |||
<https://www.rfc-editor.org/info/rfc8941>. | for HTTP", Work in Progress, Internet-Draft, draft-ietf- | |||
httpbis-sfbis-05, January 23, 2024, | ||||
<https://datatracker.ietf.org/doc/html/draft-ietf-httpbis- | ||||
sfbis-05>. | ||||
[XMLHttpRequest] | [XMLHttpRequest] | |||
WhatWG, "XMLHttpRequest", <https://xhr.spec.whatwg.org/>. | WhatWG, "XMLHttpRequest", <https://xhr.spec.whatwg.org/>. | |||
10.3. Specifications Using This Syntax (at some point of time) | 10.3. Specifications Using This Syntax (at some point of time) | |||
[CLEARSITE] | [CLEARSITE] | |||
West, M., "Clear Site Data", W3C Working Draft WD-clear- | West, M., "Clear Site Data", W3C Working Draft WD-clear- | |||
site-data-20171130, November 30, 2017, | site-data-20171130, November 30, 2017, | |||
<https://www.w3.org/TR/2017/WD-clear-site-data-20171130/>. | <https://www.w3.org/TR/2017/WD-clear-site-data-20171130/>. | |||
skipping to change at page 10, line 38 ¶ | skipping to change at page 10, line 41 ¶ | |||
<https://w3c.github.io/webappsec-feature-policy/>. | <https://w3c.github.io/webappsec-feature-policy/>. | |||
[REPORTING] | [REPORTING] | |||
Creager, D., Grigorik, I., Meyer, P., and M. West, | Creager, D., Grigorik, I., Meyer, P., and M. West, | |||
"Reporting API", W3C Working Draft WD-reporting- | "Reporting API", W3C Working Draft WD-reporting- | |||
1-20180925, September 25, 2018, | 1-20180925, September 25, 2018, | |||
<https://www.w3.org/TR/2018/WD-reporting-1-20180925/>. | <https://www.w3.org/TR/2018/WD-reporting-1-20180925/>. | |||
Latest version available at | Latest version available at | |||
<https://www.w3.org/TR/reporting-1/>. | <https://www.w3.org/TR/reporting-1/>. | |||
Appendix A. Comparison with Structured Fields | [UNICHARS] Bray, T. and P. E. Hoffman, "Unicode Character Repertoire | |||
Subsets", Work in Progress, Internet-Draft, draft-bray- | ||||
unichars-07, October 12, 2023, | ||||
<https://datatracker.ietf.org/doc/html/draft-bray- | ||||
unichars-07>. | ||||
[UTF-8] Yergeau, F., "UTF-8, a transformation format of ISO | ||||
10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November | ||||
2003, <https://www.rfc-editor.org/info/rfc3629>. | ||||
Appendix A. Comparison with Structured Fields | ||||
A.1. Base Types | A.1. Base Types | |||
+----------+----------------------------------+------------------+ | +----------+------------------------------------+------------------+ | |||
| Type | in Structured Fields | in JSON-based | | | Type | in Structured Fields | in JSON-based | | |||
| | | Fields | | | | | Fields | | |||
+----------+----------------------------------+------------------+ | +----------+------------------------------------+------------------+ | |||
| Integer | | Section 6 | | | Integer | | Section 6 | | |||
| Integer | (restricted to 15 digits) | | | | Integer | (restricted to 15 digits) | | | |||
+----------+ [RFC8941], Section 3.3.2 | [RFC8259], | | +----------+ [RFC8941bis], Section 3.3.2 | [RFC8259], | | |||
| Decimal | | Section 6 | | | Decimal | | Section 6 | | |||
| Decimal | (a fixed point decimal | | | | Decimal | (a fixed point decimal restricted | | | |||
| | restricted to 12 + 3 digits) | | | | | to 12 + 3 digits) | | | |||
+----------+ [RFC8941], Section 3.3.3 | [RFC8259], | | +----------+ [RFC8941bis], Section 3.3.3 and | [RFC8259], | | |||
| String | | Section 7 | | | String | [RFC8941bis], Section 3.3.8 | Section 7 | | |||
| String | (only ASCII supported, non-ASCII | | | | String | Strings only support ASCII | JSON strings can | | |||
| | requires using Byte Sequences) | | | | | ([RFC0020]), but "Display Strings" | transport any | | |||
+----------+ [RFC8941], Section 3.3.5 | not available | | | | cover anything encodable as | Unicode code | | |||
+----------+ | (usually mapped | | | | [UTF-8] (that excludes surrogates | point, due to | | |||
| Byte | | to strings using | | | | (Section 2.2.1 of [UNICHARS])). | the "\uxxxx" | | |||
| Sequence | | base64 encoding) | | | | | escape notation. | | |||
+----------+ [RFC8941], Section 3.3.6 | [RFC8259], | | +----------+ [RFC8941bis], Section 3.3.4 | not available, | | |||
| Boolean | | Section 3 | | | Token | | but can be | | |||
| +----------------------------------+------------------+ | | | | mapped to | | |||
+ + | strings | | ||||
| Byte | | usually mapped | | ||||
| Sequence | | to strings using | | ||||
+ + | base64 encoding | | ||||
+ Boolean + | Section 3 | | ||||
| Date | | usually mapped | | ||||
| | | to Strings or | | ||||
| | | Numbers | | ||||
| +------------------------------------+------------------+ | ||||
Table 1 | Table 1 | |||
Structured Fields provide more data types (such as "token" or "byte | Structured Fields provide more data types (such as "token" or "byte | |||
sequence"). Numbers are restricted, avoiding the JSON interop | sequence"). Numbers are restricted, avoiding the JSON interop | |||
problems described in Section 7.2. Strings are limited to ASCII, | problems described in Section 7.2. | |||
requiring the use of byte sequences should non-ASCII characters be | ||||
needed. | ||||
A.2. Structures | A.2. Structures | |||
Structured Fields define Lists ([RFC8941], Section 3.1), similar to | Structured Fields define Lists ([RFC8941bis], Section 3.1), similar | |||
JSON arrays ([RFC8259], Section 5), and Dictionaries ([RFC8941], | to JSON arrays ([RFC8259], Section 5), and Dictionaries | |||
Section 3.2), similar to JSON objects ([RFC8259], Section 4). | ([RFC8941bis], Section 3.2), similar to JSON objects ([RFC8259], | |||
Section 4). | ||||
In addition, most items in Structured Fields can be parametrized | In addition, most items in Structured Fields can be parametrized | |||
([RFC8941], Section 3.1.2), attaching a dictionary-like structure to | ([RFC8941bis], Section 3.1.2), attaching a dictionary-like structure | |||
the value. To emulate this in JSON based field, an additional | to the value. To emulate this in JSON based field, an additional | |||
nesting of objects would be needed. | nesting of objects would be needed. | |||
Finally, nesting of data structures is intentionally limited to two | Finally, nesting of data structures is intentionally limited to two | |||
levels (see Appendix A.1 of [RFC8941] for the motivation). | levels (see Appendix A.1 of [RFC8941bis] for the motivation). | |||
Appendix B. Use of JSON Field Value Encoding in the Wild | Appendix B. Use of JSON Field Value Encoding in the Wild | |||
This section is to be removed before publishing as an RFC. | This section is to be removed before publishing as an RFC. | |||
Since work started on this document, various specifications have | Since work started on this document, various specifications have | |||
adopted this format. At least one of these moved away after the HTTP | adopted this format. At least one of these moved away after the HTTP | |||
Working Group decided to focus on [RFC8941] (see thread starting at | Working Group decided to focus on [RFC8941bis] (see thread starting | |||
<https://lists.w3.org/Archives/Public/ietf-http- | at <https://lists.w3.org/Archives/Public/ietf-http- | |||
wg/2016OctDec/0505.html>). | wg/2016OctDec/0505.html>). | |||
The sections below summarize the current usage of this format. | The sections below summarize the current usage of this format. | |||
B.1. W3C Reporting API Specification | B.1. W3C Reporting API Specification | |||
Defined in W3C Working Draft "Reporting API" (Section 3.1 of | Defined in W3C Working Draft "Reporting API" (Section 3.1 of | |||
[REPORTING]). Still in use in latest working draft dated September | [REPORTING]). Still in use in latest working draft dated September | |||
2018. | 2018. | |||
skipping to change at page 12, line 22 ¶ | skipping to change at page 12, line 42 ¶ | |||
Used in earlier versions of "Clear Site Data". The current version | Used in earlier versions of "Clear Site Data". The current version | |||
replaces the use of JSON with a custom syntax that happens to be | replaces the use of JSON with a custom syntax that happens to be | |||
somewhat compatible with an array of JSON strings (see Section 3.1 of | somewhat compatible with an array of JSON strings (see Section 3.1 of | |||
[CLEARSITE] and <https://lists.w3.org/Archives/Public/ietf-http- | [CLEARSITE] and <https://lists.w3.org/Archives/Public/ietf-http- | |||
wg/2017AprJun/0214.html> for feedback). | wg/2017AprJun/0214.html> for feedback). | |||
B.3. W3C Feature Policy Specification | B.3. W3C Feature Policy Specification | |||
Originally defined in W3C document "Feature Policy" ([FEATUREPOL]), | Originally defined in W3C document "Feature Policy" ([FEATUREPOL]), | |||
but switched to use of Structured Header Fields ([RFC8941]). | but switched to use of Structured Header Fields ([RFC8941bis]). | |||
Appendix C. Implementations | Appendix C. Implementations | |||
This section is to be removed before publishing as an RFC. | This section is to be removed before publishing as an RFC. | |||
See <https://github.com/reschke/json-fields> for a proof-of-concept | See <https://github.com/reschke/json-fields> for a proof-of-concept | |||
(in development). | (in development). | |||
Appendix D. Change Log | Appendix D. Change Log | |||
skipping to change at page 15, line 8 ¶ | skipping to change at page 15, line 33 ¶ | |||
D.17. Since draft-reschke-http-jfv-13 | D.17. Since draft-reschke-http-jfv-13 | |||
Update HTTP reference. | Update HTTP reference. | |||
Mention test implementation. | Mention test implementation. | |||
Clarify that Unicode unpaired surrogates or Noncharacters must not be | Clarify that Unicode unpaired surrogates or Noncharacters must not be | |||
sent. | sent. | |||
Rewrite text about [RFC8941], add appendix comparing both formats. | Rewrite text about [RFC8941bis], add appendix comparing both formats. | |||
And send/receive examples. | And send/receive examples. | |||
D.18. Since draft-reschke-http-jfv-14 | ||||
Update HTTP reference. | ||||
Mention [RFC8941bis]. | ||||
D.19. Since draft-reschke-http-jfv-15 | ||||
Cite [RFC8941bis] (in WGLC) instead RFC 8941. Cite [UTF-8] and | ||||
[UNICHARS], and rework comparison chart for strings. | ||||
Acknowledgements | Acknowledgements | |||
Thanks go to the Hypertext Transfer Protocol Working Group | Thanks go to the Hypertext Transfer Protocol Working Group | |||
participants. | participants. | |||
Author's Address | Author's Address | |||
Julian F. Reschke | Julian F. Reschke | |||
greenbytes GmbH | greenbytes GmbH | |||
Hafenweg 16 | Hafenweg 16 | |||
End of changes. 26 change blocks. | ||||
63 lines changed or deleted | 94 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |