Re: [Json] Advice on registering JSON Lines (not JSON) as IANA Media Type

Douglas Crockford <douglas@crockford.com> Wed, 30 December 2020 19:02 UTC

Return-Path: <douglas@crockford.com>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C8AE13A0BDC for <json@ietfa.amsl.com>; Wed, 30 Dec 2020 11:02:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.896
X-Spam-Level:
X-Spam-Status: No, score=-1.896 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, NICE_REPLY_A=-0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gkkGngto8YLf for <json@ietfa.amsl.com>; Wed, 30 Dec 2020 11:02:57 -0800 (PST)
Received: from mout.perfora.net (mout.perfora.net [74.208.4.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 80AAF3A0B83 for <json@ietf.org>; Wed, 30 Dec 2020 11:02:57 -0800 (PST)
Received: from [192.168.1.99] ([70.130.86.235]) by mrelay.perfora.net (mreueus003 [74.208.5.2]) with ESMTPSA (Nemesis) id 0LuOAL-1judiB1Xl9-011f0v; Wed, 30 Dec 2020 20:02:48 +0100
To: "Hlavina, Wratko (NIH/NLM/NCBI) [E]" <whlavina@ncbi.nlm.nih.gov>, "nico@cryptonector.com" <nico@cryptonector.com>
Cc: "json@ietf.org" <json@ietf.org>
References: <BLAPR09MB63395A1C761AF08DF0F47688AED70@BLAPR09MB6339.namprd09.prod.outlook.com>
From: Douglas Crockford <douglas@crockford.com>
Message-ID: <92962f86-1e03-aaae-4b7d-bbb76c88ac6c@crockford.com>
Date: Wed, 30 Dec 2020 11:02:47 -0800
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0
MIME-Version: 1.0
In-Reply-To: <BLAPR09MB63395A1C761AF08DF0F47688AED70@BLAPR09MB6339.namprd09.prod.outlook.com>
Content-Type: multipart/alternative; boundary="------------157939458769E0E31D93832C"
Content-Language: en-US
X-Provags-ID: V03:K1:EBjIFXyvkVi0nJSAwtE4uQ7e4lPCqGrZaRNgE0lGpVQzqXZIqgT aR8DyaReQWPSd2+YsOiTESeHCYnxviMaLhZpDR2NpBzF8r6jci6LyJr2iuVvysJHIMwYbKy a//QonsRE3JhQW9p2Bbk7WKBr4cIexVpfyOluFR8V4jpAoc95Bl7XJjU+7m/02kaymk0MnA SrFCLqaUP0RFuUa9F1LJw==
X-UI-Out-Filterresults: notjunk:1;V03:K0:fcYccb+OIs4=:7uKoaHWJg2IZb6fMABvzjd SV0MyQRyivBdAeVevowNgqotgCxUwMqGlV1amsBnZMOuIHedNl8yUdyOzVq3cbEFw7DABkdL4 UG8l8BYGrbs6q3J8cabqHf4a9NYbSO0waUmau5nMvHCRo9rz/EnzigQXNmmArFkuXal70BPWj C+0Tkbsn+KKHYIQ57yC0C5RnTrTW1yGdVYs24vdn6P8/p2AqWQqXjJl5Yb6RtXL7dXyKeONdf rFO2NOs1j1K8HnzOfsdXH38WNBXHYDZe5WDJtQXO2F27cBjbkvPByQiIupaR95dHLRkqPIZcz nDC7oG9x2lcYc8GJtfHYoWC/s+N2viWYvdU5gLROC1We00VKKtoRad2rCxvUOt6nLyp5YTz/F adTAVBgk24gkO4ZZcA7w12zmSMYEEcLxX1OAHAlybCUu8Dx9fGvxpA6tw7D6l1UrMz35xN3UN hX+MdUaf/kebBVXPz198S8BRDEqoAc77wfYxkZTJY+oT2WRgDLzr
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/Eo6k-bNGk7YYpyx1BaBh4CJehQs>
Subject: Re: [Json] Advice on registering JSON Lines (not JSON) as IANA Media Type
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/json/>
List-Post: <mailto:json@ietf.org>
List-Help: <mailto:json-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/json>, <mailto:json-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 30 Dec 2020 19:03:00 -0000

Anything that is not JSON should not be called JSON. It should have a 
less confusing name.


On 2020-12-30 8:58 AM, Hlavina, Wratko (NIH/NLM/NCBI) [E] wrote:
>
> Hello, Mr. Crockford and Mr. Williams,
>
> I understand you are listed as the authors for the "application/json" 
> and "application/json-seq" IANA Media Types, respectively.
>
> I would like to ask for your advice/help with a related file format, 
> JSON Lines:
>
> https://jsonlines.org <https://jsonlines.org>
>
> I think there is value in having this format registered as a Standards 
> Tree IANA Media Type.
>
> Per the RFC6838 process, this requires Expert Review and IETF/IESG 
> approval.
>
> Not being a member of those organizations, how can I encourage such 
> registration?
>
> Motivation:
>
> Unfortunately, JSON Lines is not valid JSON (technically) and is 
> different from JSON Text Sequences.
>
> However, JSON Lines is a frequently used file format; for example, it 
> is used by many database products, including Cloud services like AWS 
> Athena, Snowflake, and others.
>
> Since it is not valid JSON, using "application/json" as media type 
> leads to processing failures and mishandling.
>
> Since it uses the newline as separator, without RS Unicode Information 
> Separator Two record separators, "application/json-seq" is not a 
> substitute Media Type, and the ecosystem of tools do not, in general, 
> support JSON Text Sequences format.
>
> In principle, good JSON programming libraries should allow streamed 
> processing of JSON content, both in emitting it and in reading it, but 
> in practice, libraries for JSON tend to require an entire JSON object 
> to be held in memory.
>
> Since HTTP emits one response per request, this implies only a single 
> JSON object per response, if using "application/json" as Media Type; 
> this is problematic for large data.
>
> In my experience, JSON Lines has become a very useful and conventional 
> file format, since it interoperates well with Unix text utilities 
> while remaining highly interoperable with many JSON tools.
>
> Cf.:
>
>   * RFC6838
>   * https://www.iana.org/assignments/media-types/application/json
>     <https://www.iana.org/assignments/media-types/application/json>
>   * https://www.iana.org/assignments/media-types/application/json-seq
>     <https://www.iana.org/assignments/media-types/application/json-seq>
>   * https://www.iana.org/assignments/media-types/application/ld+json
>     <https://www.iana.org/assignments/media-types/application/ld+json>
>   * https://stackoverflow.com/questions/51690624/json-lines-mime-type
>     <https://stackoverflow.com/questions/51690624/json-lines-mime-type>
>   * https://github.com/wardi/jsonlines/issues/9
>     <https://github.com/wardi/jsonlines/issues/9>
>
> --
> *Wratko HLAVINA*
>
> Sequence Curation, Organization, Enhancements (Technical Program Manager)
>
> NCBI Building 45 Floor 4 Room AS13D-121
> Slack: whlavina / Phone: 301-402-9730 / FAX: 301-480-2484 / Calendar: 
> https://bit.ly/2QU2EGB <https://bit.ly/2QU2EGB>
>