Re: [Json] Human JSON (Hjson)

Christian Zangl <coralllama@gmail.com> Fri, 27 May 2016 20:59 UTC

Return-Path: <coralllama@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 3BBC612D1A4 for <json@ietfa.amsl.com>; Fri, 27 May 2016 13:59:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=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 C1jBLrbTDThT for <json@ietfa.amsl.com>; Fri, 27 May 2016 13:59:53 -0700 (PDT)
Received: from mail-wm0-x22a.google.com (mail-wm0-x22a.google.com [IPv6:2a00:1450:400c:c09::22a]) (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 73E0B12D190 for <json@ietf.org>; Fri, 27 May 2016 13:59:53 -0700 (PDT)
Received: by mail-wm0-x22a.google.com with SMTP id a136so7633595wme.0 for <json@ietf.org>; Fri, 27 May 2016 13:59:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:subject:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=WmqBiiEsQAzIm1CIQogeKZ2beNp6FIN1sGFNy5qgdZs=; b=tG28N5+TB2pcROm9f80jjMHYkUyvLYdYL02cstqUhvG0DzSzWrPcuu/7jkDv1w5iMN WiR3PBjvjvw0Nilk3kRiMfBQInHQsanRzVL8oolKYxi9KJ2ju6cE3rshPpYp62yJofMI mV0ma7J5VMI0ugTWzU5C7TAbV8LRVjWiaKpXkherPnOFs5cgzMYbwHKYS7wqNjpLlZbh C5WjVz5FZIs+9Bs9i6REjQ8HGlxKP9PzaopQ8EhrzHg76VnXOH5fTx+FLQwb7N8jtVXZ xQS76PTq+6ZtvaJ3YuPjz+9a4FJRDROSc6OMTSf31LOgNq0Ld5Q5uVf0wPnoqE2cbQSQ kfhg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=WmqBiiEsQAzIm1CIQogeKZ2beNp6FIN1sGFNy5qgdZs=; b=kqxHdoHk2gkCT0bngJ7txpikg3rQVL6KM9vXDk+fnlzwFrS3zlpRTioWoeMpBmj9Eh Xokj2hcJBHOS2j2hGnYSNb6saLDG+0L5WVyTWOXYJGXZbG21OyfzNDgy4wXoeOGOC4ow lSUGRgXMqnDay+gFy+iBkNR86NCcc8fs++cWun6q/ikKxi9WcD9IUKeuvt9DCLDZG0hY vCQwrmikRMw3SrSjwAoCkfJqDTKMRhtexyFFysjX4RHnFH6xz2Vj4BKOzl4m3WlD4yv+ BEbOzpsWMzVnX1yD45AaGmyYZ4cl4aVfBo8h7HS4A2q+HrJuzMQQq5h5OPuEoljQSoWe O3hw==
X-Gm-Message-State: ALyK8tIPeMiHkvWs9mboQphdO3DCSqbtmnY57Qnzzqp4XRqbqKow/49Thlo4g2pK/OuOcA==
X-Received: by 10.28.125.86 with SMTP id y83mr534496wmc.8.1464382791801; Fri, 27 May 2016 13:59:51 -0700 (PDT)
Received: from [192.168.1.181] (178.112.50.109.wireless.dyn.drei.com. [178.112.50.109]) by smtp.googlemail.com with ESMTPSA id g192sm8013847wme.15.2016.05.27.13.59.50 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 27 May 2016 13:59:51 -0700 (PDT)
From: Christian Zangl <coralllama@gmail.com>
To: Carsten Bormann <cabo@tzi.org>, json@ietf.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> <620cd39b-1648-1b8f-57f4-c58678ff1ede@codalogic.com> <57482C07.7070403@tzi.org> <75d0ca2c-b8a5-5b08-87b3-6e70ba4228df@codalogic.com>
Message-ID: <b3709e95-3602-5775-833f-87330146ae80@gmail.com>
Date: Fri, 27 May 2016 22:59:47 +0200
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.1.0
MIME-Version: 1.0
In-Reply-To: <75d0ca2c-b8a5-5b08-87b3-6e70ba4228df@codalogic.com>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: <http://mailarchive.ietf.org/arch/msg/json/oIyIYydyckDvwouPVjLIiEWY_6I>
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 20:59:55 -0000

On 2016-05-27 13:25, Peter Cordell wrote:
> On 27/05/2016 12:14, Carsten Bormann wrote:
>> Peter Cordell wrote:
>>> And the '6' would prevent you using unquoted strings in HJSON.
>>
>> http://hjson.org/syntax.html
>>
>> says something different (but what it says clearly cannot be true).
>
> I was going by section 8.2 of http://hjson.org/rfc.html

Not sure how you came to that conclusion. My (S)ABNF is IMHO correct as 
it passes all test cases. 8.2 also has some examples:

A Hjson parser must still detect values (number, true, false or null) 
and parse them correctly. For example

      ‘3’ is the number 3
      ‘5 times’ is the string “5 times”
      ‘true’ is the boolean true
      ‘7 # minutes’ is the number 7 followed by a comment
      ’\s#([0-9a-fA-F]{3})’ is the string “\\s#([0-9a-fA-F]{3})”