Internet Engineering Task Force (IETF)                          E. Wilde
Request for Comments: 8091                               CA Technologies
Category: Informational                                    February 2017
ISSN: 2070-1721
        
Internet Engineering Task Force (IETF)                          E. Wilde
Request for Comments: 8091                               CA Technologies
Category: Informational                                    February 2017
ISSN: 2070-1721
        

A Media Type Structured Syntax Suffix for JSON Text Sequences

JSON文本序列的媒体类型结构化语法后缀

Abstract

摘要

Structured syntax suffixes for media types allow other media types to build on them and make it explicit that they are built on an existing media type as their foundation. This specification defines and registers "+json-seq" as a structured syntax suffix for JSON text sequences.

媒体类型的结构化语法后缀允许其他媒体类型对它们进行构建,并使它们显式地以现有媒体类型为基础建立它们。本规范定义并注册“+json seq”作为json文本序列的结构化语法后缀。

Status of This Memo

关于下段备忘

This document is not an Internet Standards Track specification; it is published for informational purposes.

本文件不是互联网标准跟踪规范;它是为了提供信息而发布的。

This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Not all documents approved by the IESG are a candidate for any level of Internet Standard; see Section 2 of RFC 7841.

本文件是互联网工程任务组(IETF)的产品。它代表了IETF社区的共识。它已经接受了公众审查,并已被互联网工程指导小组(IESG)批准出版。并非IESG批准的所有文件都适用于任何级别的互联网标准;见RFC 7841第2节。

Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc8091.

有关本文件当前状态、任何勘误表以及如何提供反馈的信息,请访问http://www.rfc-editor.org/info/rfc8091.

Copyright Notice

版权公告

Copyright (c) 2017 IETF Trust and the persons identified as the document authors. All rights reserved.

版权所有(c)2017 IETF信托基金和确定为文件作者的人员。版权所有。

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

本文件受BCP 78和IETF信托有关IETF文件的法律规定的约束(http://trustee.ietf.org/license-info)自本文件出版之日起生效。请仔细阅读这些文件,因为它们描述了您对本文件的权利和限制。从本文件中提取的代码组件必须包括信托法律条款第4.e节中所述的简化BSD许可证文本,并提供简化BSD许可证中所述的无担保。

Table of Contents

目录

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . .   2
   3.  The "+json-seq" Structured Syntax Suffix  . . . . . . . . . .   2
   4.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   3
   5.  Security Considerations . . . . . . . . . . . . . . . . . . .   4
   6.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   4
     6.1.  Normative References  . . . . . . . . . . . . . . . . . .   4
     6.2.  Informative References  . . . . . . . . . . . . . . . . .   5
   Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .   5
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .   5
        
   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . .   2
   3.  The "+json-seq" Structured Syntax Suffix  . . . . . . . . . .   2
   4.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   3
   5.  Security Considerations . . . . . . . . . . . . . . . . . . .   4
   6.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   4
     6.1.  Normative References  . . . . . . . . . . . . . . . . . .   4
     6.2.  Informative References  . . . . . . . . . . . . . . . . .   5
   Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .   5
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .   5
        
1. Introduction
1. 介绍

Media type structured syntax suffixes [RFC6838] were introduced as a way for a media type to signal that it is based on another media type as its foundation. Some structured syntax suffixes were registered initially [RFC6839], including "+json", for the widely popular JSON format [RFC7159].

媒体类型结构化语法后缀[RCFC338 ]被引入作为媒体类型的一种方式来指示它是基于另一种媒体类型作为其基础的。一些结构化语法后缀最初注册为[RFC6839],包括广泛流行的json格式[RFC7159]的“+json”。

JSON text sequences [RFC7464] is a recent specification in the JSON space that defines how a sequence of multiple JSON texts can be represented in one representation. This document defines and registers the "+json-seq" structured syntax suffix in the "Structured Syntax Suffix Registry".

JSON文本序列[RFC7464]是JSON领域的最新规范,它定义了如何在一个表示中表示多个JSON文本序列。本文档在“结构化语法后缀注册表”中定义并注册“+json seq”结构化语法后缀。

2. Terminology
2. 术语

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].

本文件中的关键词“必须”、“不得”、“必需”、“应”、“不应”、“应”、“不应”、“建议”、“可”和“可选”应按照[RFC2119]中所述进行解释。

3. The "+json-seq" Structured Syntax Suffix
3. “+json-seq”结构化语法后缀

The use case for the "+json-seq" structured syntax suffix is the same as for "+json": It SHOULD be used by media types when parsing the JSON text sequence of a media type leads to a meaningful result, by simply using the generic JSON text sequence processing.

“+json seq”结构化语法后缀的用例与“+json”相同:当解析媒体类型的json文本序列时,媒体类型应该使用该后缀,只需使用通用的json文本序列处理即可产生有意义的结果。

Applications encountering such a media type can then either simply use generic processing if all they need is a generic view of the JSON text sequence, or they can use generic JSON text sequence tools for initial parsing and then implement their own specific processing on top of that generic parsing tool.

遇到这种媒体类型的应用程序可以简单地使用泛型处理(如果它们只需要JSON文本序列的泛型视图),也可以使用泛型JSON文本序列工具进行初始解析,然后在泛型解析工具的基础上实现它们自己的特定处理。

4. IANA Considerations
4. IANA考虑

Structured Syntax Suffixes are registered within the "Structured Syntax Suffix Registry" maintained at <https://www.iana.org/assignments/media-type-structured-suffix>.

结构化语法后缀在维护于的“结构化语法后缀注册表”中注册<https://www.iana.org/assignments/media-type-structured-suffix>.

IANA has registered the "+json-seq" structured syntax suffix in accordance with [RFC6838].

IANA已根据[RFC6838]注册了“+json seq”结构化语法后缀。

Name: JSON Text Sequence

名称:JSON文本序列

      +suffix: +json-seq
        
      +suffix: +json-seq
        

References: [RFC7464], RFC 8091

参考文献:[RFC7464],RFC 8091

Encoding considerations: See [RFC7464] Section 2.2

编码注意事项:参见[RFC7464]第2.2节

Fragment identifier considerations: The syntax and semantics of fragment identifiers specified for +json-seq SHOULD be as specified for "application/json-seq". (At publication of this document, there is no fragment identification syntax defined for "application/json-seq".)

片段标识符注意事项:为+json-seq指定的片段标识符的语法和语义应与为“application/json-seq”指定的相同。(在本文档发布时,没有为“application/json seq”定义片段标识语法。)

The syntax and semantics for fragment identifiers for a specific "xxx/yyy+json-seq" SHOULD be processed as follows:

特定“xxx/yyy+json-seq”的片段标识符的语法和语义应按如下方式处理:

For cases defined in +json-seq, where the fragment identifier resolves per the +json-seq rules, then process as specified in +json-seq.

对于在+json-seq中定义的情况,其中片段标识符根据+json-seq规则解析,然后按照+json-seq中的指定进行处理。

For cases defined in +json-seq, where the fragment identifier does not resolve per the +json-seq rules, then process as specified in "xxx/yyy+json-seq".

对于+json-seq中定义的情况,如果片段标识符没有按照+json-seq规则解析,则按照“xxx/yyy+json-seq”中的规定进行处理。

For cases not defined in +json-seq, then process as specified in "xxx/yyy+json-seq".

对于+json-seq中未定义的情况,则按照“xxx/yyy+json-seq”中的规定进行处理。

Interoperability considerations: n/a

互操作性注意事项:不适用

Security considerations: See [RFC7464] Section 3

安全注意事项:参见[RFC7464]第3节

Contact: Applications and Real-Time Area Discussion (art@ietf.org), or any IESG-designated successor.

联系人:应用程序和实时区域讨论(art@ietf.org),或任何IESG指定的继任者。

Author/Change controller: The Applications and Real-Time Area Working Group. IESG has change control over this registration.

作者/更改控制器:应用程序和实时区域工作组。IESG对此注册具有变更控制权。

5. Security Considerations
5. 安全考虑

All the security considerations of JSON text sequences [RFC7464] apply. They are as follows:

JSON文本序列[RFC7464]的所有安全注意事项都适用。详情如下:

All the security considerations of JSON [RFC7159] apply. This format provides no cryptographic integrity protection of any kind.

JSON[RFC7159]的所有安全注意事项都适用。此格式不提供任何类型的加密完整性保护。

As usual, parsers must operate on input that is assumed to be untrusted. This means that parsers must fail gracefully in the face of malicious inputs.

通常,解析器必须对假定不可信的输入进行操作。这意味着解析器在面对恶意输入时必须正常地失败。

Note that incremental JSON text parsers can produce partial results and later indicate failure to parse the remainder of a text. A sequence parser that uses an incremental JSON text parser might treat a sequence like '<RS>"foo"<LF>456<LF><RS>' as a sequence of one element ("foo"), while a sequence parser that uses a non-incremental JSON text parser might treat the same sequence as being empty. This effect, and texts that fail to parse and are ignored, can be used to smuggle data past sequence parsers that don't warn about JSON text failures.

请注意,增量JSON文本解析器可能会产生部分结果,然后表示无法解析文本的其余部分。使用增量JSON文本解析器的序列解析器可能将类似“<RS>”foo”<LF>456<LF><RS>”的序列视为一个元素的序列(“foo”),而使用非增量JSON文本解析器的序列解析器可能将同一序列视为空。这种效果,以及无法解析且被忽略的文本,可用于通过序列解析器走私数据,而序列解析器不会警告JSON文本失败。

Repeated parsing and re-encoding of a JSON text sequence can result in the addition (or stripping) of trailing LF bytes from (to) individual sequence element JSON texts. This can break signature validation. JSON has no canonical form for JSON texts, therefore neither does the JSON text sequence format.

重复解析和重新编码JSON文本序列可能会导致从单个序列元素JSON文本中添加(或剥离)后续LF字节。这可能会破坏签名验证。JSON没有JSON文本的标准格式,因此JSON文本序列格式也没有。

6. References
6. 工具书类
6.1. Normative References
6.1. 规范性引用文件

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <http://www.rfc-editor.org/info/rfc2119>.

[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,DOI 10.17487/RFC2119,1997年3月<http://www.rfc-editor.org/info/rfc2119>.

[RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type Specifications and Registration Procedures", BCP 13, RFC 6838, DOI 10.17487/RFC6838, January 2013, <http://www.rfc-editor.org/info/rfc6838>.

[RFC6838]Freed,N.,Klensin,J.和T.Hansen,“介质类型规范和注册程序”,BCP 13,RFC 6838,DOI 10.17487/RFC6838,2013年1月<http://www.rfc-editor.org/info/rfc6838>.

[RFC7464] Williams, N., "JavaScript Object Notation (JSON) Text Sequences", RFC 7464, DOI 10.17487/RFC7464, February 2015, <http://www.rfc-editor.org/info/rfc7464>.

[RFC7464]Williams,N.,“JavaScript对象表示法(JSON)文本序列”,RFC 7464,DOI 10.17487/RFC7464,2015年2月<http://www.rfc-editor.org/info/rfc7464>.

6.2. Informative References
6.2. 资料性引用

[RFC6839] Hansen, T. and A. Melnikov, "Additional Media Type Structured Syntax Suffixes", RFC 6839, DOI 10.17487/RFC6839, January 2013, <http://www.rfc-editor.org/info/rfc6839>.

[RFC6839]Hansen,T.和A.Melnikov,“其他媒体类型结构化语法后缀”,RFC 6839,DOI 10.17487/RFC6839,2013年1月<http://www.rfc-editor.org/info/rfc6839>.

[RFC7159] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March 2014, <http://www.rfc-editor.org/info/rfc7159>.

[RFC7159]Bray,T.,Ed.“JavaScript对象表示法(JSON)数据交换格式”,RFC 7159,DOI 10.17487/RFC7159,2014年3月<http://www.rfc-editor.org/info/rfc7159>.

Acknowledgements

致谢

Thanks for comments and suggestions provided by Ben Campbell, Allan Doyle, Warren Kumari, Sean Leonard, Alexey Melnikov, Brian Raymor, and Peter Yee.

感谢Ben Campbell、Allan Doyle、Warren Kumari、Sean Leonard、Alexey Melnikov、Brian Raymor和Peter Yee提供的意见和建议。

Author's Address

作者地址

Erik Wilde CA Technologies

Erik Wilde CA Technologies

   Email: erik.wilde@dret.net
   URI:   http://dret.net/netdret/
        
   Email: erik.wilde@dret.net
   URI:   http://dret.net/netdret/