draft-reschke-http-jfv-14.txt   draft-reschke-http-jfv-15.txt 
Network Working Group J. F. Reschke Network Working Group J. F. Reschke
Internet-Draft greenbytes Internet-Draft greenbytes
Intended status: Informational 22 April 2021 Intended status: Informational 1 September 2023
Expires: 24 October 2021 Expires: 4 March 2024
A JSON Encoding for HTTP Field Values A JSON Encoding for HTTP Field Values
draft-reschke-http-jfv-14 draft-reschke-http-jfv-15
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 24 October 2021. This Internet-Draft will expire on 4 March 2024.
Copyright Notice Copyright Notice
Copyright (c) 2021 IETF Trust and the persons identified as the Copyright (c) 2023 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 Simplified BSD License text extracted from this document must include Revised BSD License text as
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 Simplified 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 (RFC8941) . . . . . . . . . . . . . . . . . . . . . . . . 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 . . . . . . . . . . . . . . . . . . . . . . . . . 6
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 . . . . . . . . . . . . . . . 8
7.1. Encoding and Characters . . . . . . . . . . . . . . . . . 7 7.1. Encoding and Characters . . . . . . . . . . . . . . . . . 8
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 . . . . . . . . . . . . . . . . . . . 9
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 . . . . . . . . . 11
A.1. Base Types . . . . . . . . . . . . . . . . . . . . . . . 10 A.1. Base Types . . . . . . . . . . . . . . . . . . . . . . . 11
A.2. Structures . . . . . . . . . . . . . . . . . . . . . . . 11 A.2. Structures . . . . . . . . . . . . . . . . . . . . . . . 12
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 . . . . . . . . . . . . . . . . . . 13
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 . . . . . . . . . . . . . 13 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 . . . . . . . . . . . . . 14
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 . . . . . . . . . . . . . 14 D.10. Since draft-reschke-http-jfv-06 . . . . . . . . . . . . . 14
D.11. Since draft-reschke-http-jfv-07 . . . . . . . . . . . . . 14 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 . . . . . . . . . . . . . 15
D.15. Since draft-reschke-http-jfv-11 . . . . . . . . . . . . . 14 D.15. Since draft-reschke-http-jfv-11 . . . . . . . . . . . . . 15
D.16. Since draft-reschke-http-jfv-12 . . . . . . . . . . . . . 15 D.16. Since draft-reschke-http-jfv-12 . . . . . . . . . . . . . 15
D.17. Since draft-reschke-http-jfv-13 . . . . . . . . . . . . . 15 D.17. Since draft-reschke-http-jfv-13 . . . . . . . . . . . . . 15
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 15 D.18. Since draft-reschke-http-jfv-14 . . . . . . . . . . . . . 15
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 15 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 16
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:
* There is no common syntax for complex field values. Several well- * 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 30 skipping to change at page 4, line 30
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,
or features not covered by "Structured Field Values" are needed. or features not covered by "Structured Field Values" are needed.
See Appendix A for more details. See Appendix A for more details.
*Note:* RFC 8941 is currently being revised; see [SFBIS].
2. Data Model and Format 2. Data Model and Format
In HTTP, field lines with the same field name can occur multiple In HTTP, field lines with the same field name can occur multiple
times within a single message (Section 5.3 of [HTTP]). When this times within a single message (Section 5.3 of [HTTP]). When this
happens, recipients are allowed to combine the field line values happens, recipients are allowed to combine the field line values
using commas as delimiter, forming a combined "field value". This using commas as delimiter, forming a combined "field value". This
rule matches nicely JSON's array format (Section 5 of [RFC8259]). rule matches nicely JSON's array format (Section 5 of [RFC8259]).
Thus, the basic data model used here is the JSON array. Thus, the basic data model used here is the JSON array.
Field definitions that need only a single value can restrict Field definitions that need only a single value can restrict
skipping to change at page 5, line 12 skipping to change at page 5, line 15
The ABNF character names and classes below are used (copied from The ABNF character names and classes below are used (copied from
[RFC5234], Appendix B.1): [RFC5234], Appendix B.1):
CR = %x0D ; carriage return CR = %x0D ; carriage return
HTAB = %x09 ; horizontal tab HTAB = %x09 ; horizontal tab
LF = %x0A ; line feed LF = %x0A ; line feed
SP = %x20 ; space SP = %x20 ; space
VCHAR = %x21-7E ; visible (printing) characters VCHAR = %x21-7E ; visible (printing) characters
Characters in JSON strings that are not allowed or discouraged in Characters in JSON strings that are not allowed or discouraged in
HTTP field values - that is, not in the "VCHAR" definition - need to HTTP field values -- that is, not in the "VCHAR" definition -- need
be represented using JSON's "backslash" escaping mechanism to be represented using JSON's "backslash" escaping mechanism
([RFC8259], Section 7). ([RFC8259], Section 7).
The control characters CR, LF, and HTAB do not appear inside JSON The control characters CR, LF, and HTAB do not appear inside JSON
strings, but can be used outside (line breaks, indentation etc.). strings, but can be used outside (line breaks, indentation etc.).
These characters need to be either stripped or replaced by space These characters need to be either stripped or replaced by space
characters (ABNF "SP"). characters (ABNF "SP").
Formally, using the HTTP specification's ABNF extensions defined in Formally, using the HTTP specification's ABNF extensions defined in
Section 5.6.1 of [HTTP]: Section 5.6.1 of [HTTP]:
skipping to change at page 7, line 18 skipping to change at page 7, line 29
considerations listed in Section 16.3 of [HTTP] into account. Many considerations listed in Section 16.3 of [HTTP] into account. Many
of these will already be accounted for by using the format defined in of these will already be accounted for by using the format defined in
this specification. this specification.
Readers of HTTP-related specifications frequently expect an ABNF Readers of HTTP-related specifications frequently expect an ABNF
definition of the field value syntax. This is not really needed definition of the field value syntax. This is not really needed
here, as the actual syntax is JSON text, as defined in Section 2 of here, as the actual syntax is JSON text, as defined in Section 2 of
[RFC8259]. [RFC8259].
A very simple way to use this JSON encoding thus is just to cite this A very simple way to use this JSON encoding thus is just to cite this
specification - specifically the "json-field-value" ABNF production specification -- specifically the "json-field-value" ABNF production
defined in Section 2 - and otherwise not to talk about the details of defined in Section 2 -- and otherwise not to talk about the details
the field syntax at all. of the field syntax at all.
An alternative approach is just to repeat the ABNF-related parts from An alternative approach is just to repeat the ABNF-related parts from
Section 2. Section 2.
This frees the specification from defining the concrete on-the-wire This frees the specification from defining the concrete on-the-wire
syntax. What's left is defining the field value in terms of a JSON syntax. What's left is defining the field value in terms of a JSON
array. An important aspect is the question of extensibility, e.g. array. An important aspect is the question of extensibility, e.g.
how recipients ought to treat unknown field names. In general, a how recipients ought to treat unknown field names. In general, a
"must ignore" approach will allow protocols to evolve without "must ignore" approach will allow protocols to evolve without
versioning or even using entire new field names. versioning or even using entire new field names.
skipping to change at page 8, line 6 skipping to change at page 8, line 18
JSON interoperability pain points. This specification borrows from JSON interoperability pain points. This specification borrows from
the requirements made over there: the requirements made over there:
7.1. Encoding and Characters 7.1. Encoding and Characters
This specification requires that field values use only US-ASCII This specification requires that field values use only US-ASCII
characters, and thus by definition uses a subset of UTF-8 characters, and thus by definition uses a subset of UTF-8
(Section 2.1 of [RFC7493]). (Section 2.1 of [RFC7493]).
Furthermore, escape sequences in JSON strings (Section 7 of Furthermore, escape sequences in JSON strings (Section 7 of
[RFC8259]) - both in object member names and string values - are not [RFC8259]) -- both in object member names and string values -- are
allowed to represent non-Unicode code points such as unpaired not allowed to represent non-Unicode code points such as unpaired
surrogates or Noncharacters (see "General Structure" in [UNICODE]). surrogates or Noncharacters (see "General Structure" in [UNICODE]).
7.2. Numbers 7.2. Numbers
Be aware of the issues around number precision, as discussed in Be aware of the issues around number precision, as discussed in
Section 2.2 of [RFC7493]. Section 2.2 of [RFC7493].
7.3. Object Constraints 7.3. Object Constraints
As described in Section 4 of [RFC8259], JSON parser implementations As described in Section 4 of [RFC8259], JSON parser implementations
skipping to change at page 9, line 15 skipping to change at page 9, line 26
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, 30 March 2021, June 2022, <https://www.rfc-editor.org/info/rfc9110>.
<https://tools.ietf.org/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 14 skipping to change at page 10, line 24
[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 [RFC8941] Nottingham, M. and P-H. Kamp, "Structured Field Values for
HTTP", RFC 8941, DOI 10.17487/RFC8941, February 2021, HTTP", RFC 8941, DOI 10.17487/RFC8941, February 2021,
<https://www.rfc-editor.org/info/rfc8941>. <https://www.rfc-editor.org/info/rfc8941>.
[SFBIS] Nottingham, M. and P.-H. Kamp, "Structured Field Values
for HTTP", Work in Progress, Internet-Draft, draft-ietf-
httpbis-sfbis-03, 3 August 2023,
<https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-
sfbis-03>.
[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, 30 November 2017, site-data-20171130, 30 November 2017,
<https://www.w3.org/TR/2017/WD-clear-site-data-20171130/>. <https://www.w3.org/TR/2017/WD-clear-site-data-20171130/>.
Latest version available at <https://www.w3.org/TR/clear- Latest version available at <https://www.w3.org/TR/clear-
skipping to change at page 10, line 42 skipping to change at page 11, line 9
"Reporting API", W3C Working Draft WD-reporting- "Reporting API", W3C Working Draft WD-reporting-
1-20180925, 25 September 2018, 1-20180925, 25 September 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 <https://www.w3.org/TR/ Latest version available at <https://www.w3.org/TR/
reporting-1/>. reporting-1/>.
Appendix A. Comparison with Structured Fields 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 | [RFC8941], Section 3.3.1 | [RFC8259], | | Integer | [RFC8941], Section 3.3.1 | [RFC8259], |
| | | Section 6 | | | | Section 6 |
| +----------------------------------+------------------+ | +-----------------------------------+------------------+
| | (restricted to 15 digits) | | | | (restricted to 15 digits) | |
+==========+----------------------------------+------------------+ +==========+-----------------------------------+------------------+
| Decimal | [RFC8941], Section 3.3.2 | [RFC8259], | | Decimal | [RFC8941], Section 3.3.2 | [RFC8259], |
| | | Section 6 | | | | Section 6 |
| +----------------------------------+------------------+ | +-----------------------------------+------------------+
| | (a fixed point decimal | | | | (a fixed point decimal restricted | |
| | restricted to 12 + 3 digits) | | | | to 12 + 3 digits) | |
+==========+----------------------------------+------------------+ +==========+-----------------------------------+------------------+
| String | [RFC8941], Section 3.3.3 | [RFC8259], | | String | [RFC8941], Section 3.3.3 | [RFC8259], |
| | | Section 7 | | | | Section 7 |
| +----------------------------------+------------------+ | +-----------------------------------+------------------+
| | (only ASCII supported, non-ASCII | | | | (only ASCII supported, non-ASCII | |
| | requires using Byte Sequences) | | | | requires using Byte Sequences; | |
+==========+----------------------------------+------------------+ | | but see Section 3.3.8 of [SFBIS]) | |
| Token | [RFC8941], Section 3.3.4 | not available | +==========+-----------------------------------+------------------+
+==========+----------------------------------+------------------+ | Token | [RFC8941], Section 3.3.4 | not available |
| Byte | [RFC8941], Section 3.3.5 | not available | +==========+-----------------------------------+------------------+
| Sequence +----------------------------------+------------------+ | Byte | [RFC8941], Section 3.3.5 | not available |
| | | (usually mapped | | Sequence +-----------------------------------+------------------+
| | | to strings using | | | | (usually mapped |
| | | base64 encoding) | | | | to strings using |
+==========+----------------------------------+------------------+ | | | base64 encoding) |
| Boolean | [RFC8941], Section 3.3.6 | [RFC8259], | +==========+-----------------------------------+------------------+
| | | Section 3 | | Boolean | [RFC8941], Section 3.3.6 | [RFC8259], |
+==========+----------------------------------+------------------+ | | | Section 3 |
+==========+-----------------------------------+------------------+
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. Strings are limited to ASCII,
requiring the use of byte sequences should non-ASCII characters be requiring the use of byte sequences should non-ASCII characters be
needed. needed (but see Section 3.3.8 of [SFBIS]).
A.2. Structures A.2. Structures
Structured Fields define Lists ([RFC8941], Section 3.1), similar to Structured Fields define Lists ([RFC8941], Section 3.1), similar to
JSON arrays ([RFC8259], Section 5), and Dictionaries ([RFC8941], JSON arrays ([RFC8259], Section 5), and Dictionaries ([RFC8941],
Section 3.2), similar to JSON objects ([RFC8259], Section 4). 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 ([RFC8941], Section 3.1.2), attaching a dictionary-like structure to
the value. To emulate this in JSON based field, an additional the value. To emulate this in JSON based field, an additional
skipping to change at page 15, line 24 skipping to change at page 15, line 45
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 [RFC8941], 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 [SFBIS].
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. 24 change blocks. 
73 lines changed or deleted 87 lines changed or added

This html diff was produced by rfcdiff 1.45. The latest version is available from http://tools.ietf.org/tools/rfcdiff/