RFC 8091

A Media Type Structured Syntax Suffix for JSON Text Sequences

πŸ“… published February 2017, from ietf

A Media Type Structured Syntax Suffix for JSON Text Sequences πŸŽ€

okay bestie, this is RFC 8091 and it's giving "tiny but mighty" πŸ’–

Here's the title block tea β˜•:

  • RFC number: 8091 πŸ¦‹
  • Author: Erik Wilde, from CA Technologies 🧚
  • Category: Informational (so it's published for info, not a Standards Track thing) πŸ“š
  • Date: February 2017 πŸ“…
  • ISSN: 2070-1721
  • Obsoletes/Updates: the title block doesn't list anything it obsoletes or updates, so it's a standalone doc 🌸

Abstract ✨

Okay so structured syntax suffixes for media types are iconic because they let one media type build on another and make it super clear what it's built on, like a foundation πŸ—οΈπŸ’… This spec defines and registers "+json-seq" as a structured syntax suffix for JSON text sequences. It's giving clean and intentional πŸ’œ

Status of This Memo πŸ“

Real talk: this document is not an Internet Standards Track spec. It's published for informational purposes 🌈 It's still an IETF product, it represents the IETF community's consensus, got public review, and was approved for publication by the Internet Engineering Steering Group (IESG). Not every IESG-approved doc is a candidate for any level of Internet Standard, so check Section 2 of RFC 7841 if you're curious πŸ™ˆ

For the current status, errata, and feedback, go to http://www.rfc-editor.org/info/rfc8091 πŸ”—

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

This doc is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) as they were in effect on the publication date. Read these carefully, bestie, because they explain your rights and restrictions πŸ“œ Any Code Components pulled out of this doc must include the Simplified BSD License text, as described in Section 4.e of the Trust Legal Provisions, and they come with no warranty, per the Simplified BSD License πŸ’–

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 🧚

Media type structured syntax suffixes [RFC6838] were introduced so a media type could signal that it's built on another media type as its foundation πŸ—οΈ Some were registered early on [RFC6839], including "+json", which is for the super popular JSON format [RFC7159] πŸ’…

JSON text sequences [RFC7464] are a newer spec in the JSON world. They define how a bunch of JSON texts can live together in one representation 🫢 This doc defines and registers the "+json-seq" structured syntax suffix in the "Structured Syntax Suffix Registry" ✨

2. Terminology πŸ“–

Okay, the key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be read as described in [RFC2119] πŸ”₯

3. The "+json-seq" Structured Syntax Suffix ✨

The vibe for "+json-seq" is the same as for "+json": it SHOULD be used by media types when parsing their JSON text sequence leads to something meaningful, just by using generic JSON text sequence processing πŸ’–

Apps that run into one of these media types have options πŸ’… They can just use generic processing if a generic view of the JSON text sequence is all they need. Or they can use generic JSON text sequence tools for the first parse, then add their own specific processing on top of that generic tool 🌈

4. IANA Considerations πŸ“‹

Structured Syntax Suffixes are registered in the "Structured Syntax Suffix Registry", which lives at https://www.iana.org/assignments/media-type-structured-suffix πŸ¦‹

IANA registered the "+json-seq" structured syntax suffix following [RFC6838] πŸŽ€ Here's the registration template, verbatim:

   Name: JSON Text Sequence

   +suffix: +json-seq

   References: [RFC7464], RFC 8091

   Encoding considerations: See [RFC7464] Section 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".)

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

         For cases defined in +json-seq, where the fragment
         identifier resolves per the +json-seq rules, then process as
         specified in +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".

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

   Interoperability considerations: n/a

   Security considerations: See [RFC7464] Section 3

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

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

5. Security Considerations πŸ”

Bestie, this section is serious business, so read every word πŸ™ˆπŸ’€

All the security considerations of JSON text sequences [RFC7464] apply, and they are as follows:

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

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 πŸ‘€

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 πŸ’”

6. References πŸ“š

6.1. Normative References πŸ’œ

[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>.

[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>.

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

6.2. Informative References 🌸

[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>.

[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>.

Acknowledgements 🫢

Big thanks to Ben Campbell, Allan Doyle, Warren Kumari, Sean Leonard, Alexey Melnikov, Brian Raymor, and Peter Yee for their comments and suggestions πŸ’–

Author's Address 🧚

Erik Wilde
CA Technologies

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

That's the whole RFC, bestie! πŸŒˆβœ¨πŸ’…

πŸ“¦ where this page comes from