Re: [Json] Human JSON (Hjson)

Phillip Hallam-Baker <ietf@hallambaker.com> Thu, 26 May 2016 14:01 UTC

Return-Path: <hallam@gmail.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 B316712D8D3 for <json@ietfa.amsl.com>; Thu, 26 May 2016 07:01:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.4
X-Spam-Level:
X-Spam-Status: No, score=-2.4 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.198, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 EZgDwxvQbkjr for <json@ietfa.amsl.com>; Thu, 26 May 2016 07:01:54 -0700 (PDT)
Received: from mail-qk0-x22d.google.com (mail-qk0-x22d.google.com [IPv6:2607:f8b0:400d:c09::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id EE80012DB0C for <json@ietf.org>; Thu, 26 May 2016 07:01:52 -0700 (PDT)
Received: by mail-qk0-x22d.google.com with SMTP id y126so58433692qke.1 for <json@ietf.org>; Thu, 26 May 2016 07:01:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc; bh=InWajPpzOOfv5+45fPhdq8MUdROG5EN3P/iMHutOCH4=; b=MNWNFFy+oTGNqm+n20NXuRgIp2mvErwq0hU+0QLF5hQv5QgqCotC4AuBPIRYkwghsQ Pgn1bDLrbG9ERQkIj3LhP26GtXnRF1rDIdben4oHsSidiclXkkVihjQge55iKjtODiF7 8XS8SUsa1eADPy9h4QXkREurnz9y92pUwgan4OkWHb+rFq0KoajMDc13eulacDNi52uy sf86ZCRtNk9FbQs1wFqsaZ0fjpj+GIxaR7IuAC4MKqgnSS9+j25+hkTCyD+g305Jxgf5 FN5sI8mJisjmHMtIwez3cGVXVCtYr+aNd4zZkF0B1PawxI+Yv17Ac8wv8WD+Zm+5CENw 1jUA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc; bh=InWajPpzOOfv5+45fPhdq8MUdROG5EN3P/iMHutOCH4=; b=e2Kc12h/lQRC4pTfU1v6y7sHzJu1i45620xGQ+tJAZV46ZizRzaYKNioZgetMGJ4xy lrA23pPsqmwD5M+QnbVL4rI8aJFvXr77PPDGsoewqnX0/GUBiFp6ymGjPPieRv4Z8dff bE+9lzFFAeE7gn3FISU/YDZbk6i7mVTnBHXNLalkLs3WJ90eqrhPylSMYazzR8z2oDw0 1e4DF25P+cgTYQwxGaehnYmUP24DWATifQhcqETe5P2xM2iV/BO15SIwK0yzPTh3cAr5 9/+Wshc+Ywp0ssgY+Kr+t4qEURvOPE+d1z6pmjMEwz8bqXqbsTGNEH4ZzWac5gZ7HuEs LlSw==
X-Gm-Message-State: ALyK8tK1f53jz1Ak+sxxq+liEnhgrpOoGmzhxkSMbIRwd4NkWGCkWbIWeBDMPb9Sg/8pNp5BSkq0YTJeOvj5Mg==
MIME-Version: 1.0
X-Received: by 10.200.51.165 with SMTP id c34mr8937938qtb.48.1464271312029; Thu, 26 May 2016 07:01:52 -0700 (PDT)
Sender: hallam@gmail.com
Received: by 10.55.25.85 with HTTP; Thu, 26 May 2016 07:01:51 -0700 (PDT)
In-Reply-To: <82b2ba3f-a6c2-c98b-b365-b698ab285149@codalogic.com>
References: <9ec25767-7471-2ca3-ded5-afed67863742@gmail.com> <82b2ba3f-a6c2-c98b-b365-b698ab285149@codalogic.com>
Date: Thu, 26 May 2016 10:01:51 -0400
X-Google-Sender-Auth: Vr4otL5B09YUd_guiRCiWLmuVzE
Message-ID: <CAMm+Lwjw-FgrH1yED5B98=3vsx_KjX_VANn=7efPVoD_yPcC1w@mail.gmail.com>
From: Phillip Hallam-Baker <ietf@hallambaker.com>
To: Peter Cordell <petejson@codalogic.com>
Content-Type: multipart/alternative; boundary="001a1141bfc4688e020533bf3bf0"
Archived-At: <http://mailarchive.ietf.org/arch/msg/json/4QQYRXEA9tm4Qw9u__6TzOx3ERQ>
Cc: Christian Zangl <coralllama@gmail.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:01:57 -0000

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.