[Json] Human JSON (Hjson)

Christian Zangl <coralllama@gmail.com> Tue, 24 May 2016 21:36 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 9124212D557 for <json@ietfa.amsl.com>; Tue, 24 May 2016 14:36:41 -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 OHyHgT8aaSIN for <json@ietfa.amsl.com>; Tue, 24 May 2016 14:36:40 -0700 (PDT)
Received: from mail-wm0-x234.google.com (mail-wm0-x234.google.com [IPv6:2a00:1450:400c:c09::234]) (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 C2CFD12B056 for <json@ietf.org>; Tue, 24 May 2016 14:36:39 -0700 (PDT)
Received: by mail-wm0-x234.google.com with SMTP id n129so151461756wmn.1 for <json@ietf.org>; Tue, 24 May 2016 14:36:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=Uefxf3x7K1ZbuavW1Tre/EWmsZFY/lRhSI2rE1mGJXQ=; b=kiKnDO6yauu3cgZ4O4DM333ErdCr1VNNR/58mmIq9Xsv3yWMh5GRNar8K+q5p8J5Pj TtCkNHavfg6AA8rfDuP3HDyYIir39rdgfB1xYfXYBU2KgD0/gWQIzy//GZdkZ7Fs4mvL end7Fwsw9TI0QHToEg1MWd1K2P+MeXVWBC6flx0RpsXvvw2oY89djN9kHkyvn5vX109j hmvBjIFfTHOvhhUJGVKYoVzalaBgAsulXyT1Krw5VWLvWuZiD+yNobmMmT42UkFyCB2G S+tKVumaRp4QW7RCBcrIhW/INSyAunQND9e5kBfepjSzmocH3EAweR42HnR7bDk4T5q5 Cogw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=Uefxf3x7K1ZbuavW1Tre/EWmsZFY/lRhSI2rE1mGJXQ=; b=SDKhFHtlH03E8yGkQMTbV0cBWcBfkMZf/G4CzIYNIURiUNAMqYr8/ddACpLoO5nBHO Vx55xtL589C7KdrUlr2I+KFnaqcqF5YsKoQb7FuEZVVo19q11bD5fZrpSZ3ApQgJURG3 xnFJKQ1x2q88w94s5df0HqTvSpvPvTcf9ox2rBhAQgpoddFTe/s7C05bpSveu/ptE7/A vIgmMP6PmetHty0dtoLGgNXEWunqWEsg5oQu14aaYTp1F0l81/EnFLGUxsw7fZTKe2Up fTUMt9Uatb1YH1JnyQdsdR7tUU4TPROTw6rdjw0K+f/gWWSlxbfmGc63om2ODIUZv7aF /i5g==
X-Gm-Message-State: ALyK8tLLV2SDGUbY7pZWHfdCZfZQJdNTDgdWfSN+TocT5uiqvejYFPrr7y1QhMS6Et6xdw==
X-Received: by 10.28.48.196 with SMTP id w187mr826785wmw.71.1464125798290; Tue, 24 May 2016 14:36:38 -0700 (PDT)
Received: from [192.168.1.181] (178.113.53.64.wireless.dyn.drei.com. [178.113.53.64]) by smtp.googlemail.com with ESMTPSA id c185sm20759161wme.9.2016.05.24.14.36.37 for <json@ietf.org> (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 May 2016 14:36:37 -0700 (PDT)
To: json@ietf.org
From: Christian Zangl <coralllama@gmail.com>
Message-ID: <9ec25767-7471-2ca3-ded5-afed67863742@gmail.com>
Date: Tue, 24 May 2016 23:36:35 +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
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: <http://mailarchive.ietf.org/arch/msg/json/AWVBCO4jThoH2k2s4fIGARcn_3I>
Subject: [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: Tue, 24 May 2016 21:36:41 -0000

JSON is used in a lot of places and has helped improve things like data 
exchange and data storage. It is also used in areas it's less suited 
for, like configuration files. People seem to prefer JSON for 
configuration over YAML and other config formats.

I started Human JSON (Hjson) because I found the experience frustrating 
(for example missing/trailing comma problems, no comments). With Hjson 
you get a superset of JSON that allows you to

- add #, // or /**/ comments,
- omit quotes for keys,
- omit quotes for strings (terminated by LF, no escapes),
- omit braces for the root object,
- omit the comma at the end of a line
- add trailing commas and
- use multiline strings with proper whitespace handling.

These changes should make it easer to read and write configs while still 
preserving the power of JSON.

Joe Hildebrand approached me with an idea to publish Hjson as a RFC. You 
can find the draft here: http://hjson.org/rfc.html There are also syntax 
diagrams and more at http://hjson.org/syntax.html

Thoughts?