Re: [Json] Human JSON (Hjson)

Phillip Hallam-Baker <ietf@hallambaker.com> Fri, 27 May 2016 12:08 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 1E9A612D0BA for <json@ietfa.amsl.com>; Fri, 27 May 2016 05:08:07 -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 gcRDmyvs-shP for <json@ietfa.amsl.com>; Fri, 27 May 2016 05:08:05 -0700 (PDT)
Received: from mail-qg0-x22e.google.com (mail-qg0-x22e.google.com [IPv6:2607:f8b0:400d:c04::22e]) (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 6833112D0AE for <json@ietf.org>; Fri, 27 May 2016 05:08:05 -0700 (PDT)
Received: by mail-qg0-x22e.google.com with SMTP id 90so49659131qgz.1 for <json@ietf.org>; Fri, 27 May 2016 05:08:05 -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=0Jd2sn3XYf31bOj2GWxC+4Ksmw8gqsvFY3PcGySdTN4=; b=kgQ8qcvq4MMwAhX/Y/jtRfB4huIgpFd1yLsajXnDN+4j1ojr+ZyaVbWmjMmljjgOLd cPcNdZJo1Ec5b3bxN2aAthEpbvDblORcxIu4dPWtlChbkRmmBuUMHiVO2W538/dtXRXS NtCjXwlblPyJxh40fWuH68Ick934yl1+WdK9UBzrFyVsm1+8sza3AsZlYRc5JDXMfjYd JjQ5QQ1UD2OO0HDXQ6vGh9CeLxbHRNzqRMABoZ2as5cJjmCz4i44VnhJIgGcyT2Z3mTw um5IQ+7CeTrFWkZK8+6aLiwWJ0Kq04A+5n5dQr0FogpAwDpOkJ1nKLmP1r3JwgyyRTgT Cc+w==
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=0Jd2sn3XYf31bOj2GWxC+4Ksmw8gqsvFY3PcGySdTN4=; b=hqDw35e9SNu91U4Lg6mkH3gdqscy3yv5dy4pfnVf/+G4VtY4NrY6lH99z0fHxbVa79 IgIwqNWFL2lzA8Uko5GE36p+5Lyd4PjfwgRGxwlTGCRl7dAQL8wXw7zm3BQFrDcCdBzU jxAZOYduC7by9cx5W+4//RugICXHnt+PSVJGWguQxn7CMOLwqc7ZnFPk+57jk6hZexFK lUYvOw4hcBBcEoyKccW3C/fzY8qEK6HrfcWr26hYeIpSyOw/SVWmfpuNFZTqndXSOD2D A9T3/Kp0AT18cD6s/NRSdIrNstUopm9YNrKUHnROzVatqi1JABEmgf0Wbk40N/HMSoKP HNtg==
X-Gm-Message-State: ALyK8tJeCDguG267srEMEOmgLZH0Y9UZNqbq+YbGNmVglqwVpW0sNIDEf9UezCGIW7I7HKyiaczhM90w/10Uew==
MIME-Version: 1.0
X-Received: by 10.140.238.66 with SMTP id j63mr13161686qhc.48.1464350884456; Fri, 27 May 2016 05:08:04 -0700 (PDT)
Sender: hallam@gmail.com
Received: by 10.55.25.85 with HTTP; Fri, 27 May 2016 05:08:04 -0700 (PDT)
In-Reply-To: <57482236.2030402@tzi.org>
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> <3902e167-6a07-9311-4569-484f015f08be@gmail.com> <CAMm+Lwhh=h0DfWR4LFPgKVLpz-vg8RvFDLfm5DCUxv5tdC-=_g@mail.gmail.com> <2a9060c3-7f2a-6675-2eba-9a14dc823138@gmail.com> <57482236.2030402@tzi.org>
Date: Fri, 27 May 2016 08:08:04 -0400
X-Google-Sender-Auth: kKkf3ndhXnQljnLnr5wJDn3bv70
Message-ID: <CAMm+LwhBrr4BgTWgAivAWYNgETF0fmfF=YMHff_VD3-Wy=DpKA@mail.gmail.com>
From: Phillip Hallam-Baker <ietf@hallambaker.com>
To: Carsten Bormann <cabo@tzi.org>
Content-Type: multipart/alternative; boundary="001a1135933c4b71170533d1c2f0"
Archived-At: <http://mailarchive.ietf.org/arch/msg/json/9hQz9ac7NOKbDjcV1kFEnJSGllA>
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: Fri, 27 May 2016 12:08:07 -0000

On Fri, May 27, 2016 at 6:32 AM, Carsten Bormann <cabo@tzi.org> wrote:

> >> I don't like quoteless strings with spaces. I think they are going to
> >> cause serious problems.
> >
> > Please explain.
>
> They sure work very well in YAML.
> But the rules for what you can and cannot do there are sometimes
> perceived as complicated (why do you need quotes here? Oh, the colon.):
>
>     title: "6LoWPAN: the Wireless Embedded Internet"
>
> But then YAML has additional, more powerful quoting mechanisms, such as:
>
>     title: >-
>       Information Technology -- ASN.1 encoding rules:
>       Specification of Basic Encoding Rules (BER), Canonical Encoding
>       Rules (CER) and Distinguished Encoding Rules (DER)
>
> Grüße, Carsten


Where does whitespace get added to the final string and what whitespace is
added? Does the string have two newlines or none?

Are these strings different or identical?

     This is a test string.

     This is a
     test string.

     This is a
     test string.

I am not even sure that the example will survive email. It certainly won't
survive auto formatting on a lot of editors that prune away trailing spaces.

Verbatim strings have a long history going back to Pascal. The @ escape
isn't pretty but it is a well established mechanism familiar to millions of
coders. The user base of YAML really isn't in the same league as C#.