Re: [Json] Human JSON (Hjson)

Stefan Hagen <stefan@dilettant.eu> Thu, 26 May 2016 14:32 UTC

Return-Path: <stefan@dilettant.eu>
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 15BAF12DB46 for <json@ietfa.amsl.com>; Thu, 26 May 2016 07:32:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.718
X-Spam-Level:
X-Spam-Status: No, score=-2.718 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, MIME_QP_LONG_LINE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=dilettant.eu
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 j-miJ0dSxDD1 for <json@ietfa.amsl.com>; Thu, 26 May 2016 07:31:52 -0700 (PDT)
Received: from mailrelay12.public.one.com (mailrelay12.public.one.com [195.47.247.212]) (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 8C7A912D746 for <json@ietf.org>; Thu, 26 May 2016 07:31:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dilettant.eu; s=20140924; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=78GkYmmaPir1CqFGbrE0HxeL/zP9FRZOsl/mzLMnxfY=; b=DORI1PrZM92c/zkQ0K3kTMQv5bfQWMOCzkrTPh0OHV6uhCo/i8fsIJehWv54rOXsHp3c/ScCgkn70 5VGy1u+t5iI1IkXqdsVPNnelwjWgTzcG/UpRVkdkOPIC7SuR/h8HzEGYeYJFx6RKmytrhsWdtDqKS5 OzQNOn5fFabLL9ZE=
X-HalOne-Cookie: a164f558c82bbb502644986ec15b9c80618d1520
X-HalOne-ID: 8e176dc1-234e-11e6-bb5b-b82a72cffc46
Received: from [192.168.0.17] (unknown [37.201.169.98]) by smtpfilter4.public.one.com (Halon Mail Gateway) with ESMTPSA; Thu, 26 May 2016 14:31:37 +0000 (UTC)
Content-Type: multipart/alternative; boundary="Apple-Mail-0A0F6EC4-9CF7-4B17-912C-5D70E1A7F124"
Mime-Version: 1.0 (1.0)
From: Stefan Hagen <stefan@dilettant.eu>
X-Mailer: iPhone Mail (13F69)
In-Reply-To: <CAMm+Lwjw-FgrH1yED5B98=3vsx_KjX_VANn=7efPVoD_yPcC1w@mail.gmail.com>
Date: Thu, 26 May 2016 16:31:36 +0200
Content-Transfer-Encoding: 7bit
Message-Id: <2E41CD46-8289-4E2D-B68A-EC213BEEA7E8@dilettant.eu>
References: <9ec25767-7471-2ca3-ded5-afed67863742@gmail.com> <82b2ba3f-a6c2-c98b-b365-b698ab285149@codalogic.com> <CAMm+Lwjw-FgrH1yED5B98=3vsx_KjX_VANn=7efPVoD_yPcC1w@mail.gmail.com>
To: Phillip Hallam-Baker <ietf@hallambaker.com>
Archived-At: <http://mailarchive.ietf.org/arch/msg/json/PILvWRonzsqbMK7MUcEDID5DmCE>
Cc: Christian Zangl <coralllama@gmail.com>, Peter Cordell <petejson@codalogic.com>, JSON WG <json@ietf.org>
Subject: Re: [Json] Human JSON (Hjson)
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.17
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: Thu, 26 May 2016 14:32:03 -0000

> Am 26.05.2016 um 16:01 schrieb Phillip Hallam-Baker <ietf@hallambaker.com>:
> 
> 
> 
>> On Thu, May 26, 2016 at 7:03 AM, Peter Cordell <petejson@codalogic.com> wrote:
>> For me JSON is too simple, and YAML is too complex.  I've tried to get into YAML a couple of times, but it seems to have multiple ways to do the same things, so I end up getting confused.  It clearly fails at at least one level to be human friendly.  Why JSON doesn't have comments eludes me.  JavaScript does, so missing that bit in the subsetting was a big drop off IMO.
>> 
>> I'd love something that is more flexible than JSON, but less complicated than YAML.  While I might quibble about some of the choices in this proposal, the fact that it can be described as JSON with 7 lines of variations is a big win.
>> 
>> What I find frustrating in this space is that protocols and specifications are the bread and butter of IETF.  And yet the IETF has put very little effort into developing 'tools' for this area (*).  And the really sad thing is that the reason is not because this is a difficult problem, but more that it is such a simple problem that everyone comes up with their own pet solution and they'd rather have no solution instead of someone else's solution.  As a result we end up with other groups second hand goods like XML and JSON.
>> 
>> So I'd welcome it going forward in a form that would allow experience with working with the format and would be simple for a working group to adopt and put on standards track if they felt it was useful.  Perhaps as an AD shepherded individual RFC that can just be 're-badged' to put it on standards track if the desire arose.
>> 
>> (* OK, we have ABNF, but that's the assembly language of protocol design and we should really be aspiring to higher levels of abstraction in this day and age.)
>> 
>> Pete Cordell
>> Read & write XML in C++, http://www.xml2cpp.com
> 
> This seems to be the 'stop people using JSON' working group.
> 
> Every single time someone suggests a variant of JSON, the response is 'NO'. Which wouldn't be bad only then the same people get go off and design something entirely different that doesn't match JSON at all. 
> 
> So instead of adding binary extensions to JSON, we get CBOR, a completely different specification that requires completely different tooling.
> 
> CBOR was not developed in an open fashion and now the same people who got to benefit from that end run around the IETF rules want to block this work in favor of their pet ponies again.
> 
> I suggest that we form a separate WG for encodings that are supersets of JSON encoding but map back to the JSON data model. And if we can't form it here, we take the work somewhere that is actually open and the insiders club doesn't get to veto reasonable proposals so they can clear the track for their own proposals.
> 
> 
> A superset of JSON encoding optimized for human input makes a lot of sense. In particular it should be possible for a single parser to read data in either strict JSON or JSON-x. Which is what I did with JSON-B, JSON-C and JSON-D.
> 
> I suggest the following additions:
> 
> 1) Comments
> 
> 2) Use of quotes on labels is optional if the label conforms to C-like rules (does not start with a digit or contain white space, control or punctuation marks.
> 
> 3) Allow trailing comas
> 
> 4) Punctuation optional in situations it is not ambiguous.

I support all 4 selected additions proposed.

1 I already suggested

2) is nice albeit eg in dot language I never know if it irritates me more to have to add quotes for those labels needing them or that then the quoted and unqupted ones look somehow like from different classes ...

Ad 3)
It is not cool IMO to state the end of a sequence by absence of an element separator when there is in any case a terminating "embedding" token following.

Ad 4)
Iff we find a way to compactly describe these situations ;-)

Best, Stefan  # a valid array to the right?