Re: [Json] Meanwhile, out there...

John Cowan <> Sun, 02 March 2014 16:41 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id 7E5581A096F for <>; Sun, 2 Mar 2014 08:41:23 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -3.147
X-Spam-Status: No, score=-3.147 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RP_MATCHES_RCVD=-0.547] autolearn=ham
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 2xikZk2UwZsJ for <>; Sun, 2 Mar 2014 08:41:21 -0800 (PST)
Received: from ( []) by (Postfix) with ESMTP id 99BB41A0972 for <>; Sun, 2 Mar 2014 08:41:21 -0800 (PST)
Received: from cowan by with local (Exim 4.72) (envelope-from <>) id 1WK9S0-0000B6-JW; Sun, 02 Mar 2014 11:41:16 -0500
Date: Sun, 02 Mar 2014 11:41:16 -0500
From: John Cowan <>
To: Tim Bray <>
Message-ID: <>
References: <> <> <>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <>
User-Agent: Mutt/1.5.20 (2009-06-14)
Sender: John Cowan <>
Cc: Mark Nottingham <>, Paul Hoffman <>, JSON WG <>
Subject: Re: [Json] Meanwhile, out there...
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Sun, 02 Mar 2014 16:41:23 -0000

Tim Bray scripsit:

> Actually, quite sensible on the surface, aside from allowing
> +/-Infinity.

I was thinking just the opposite; that's one of the few advantages
of JSON5.  The rest is nothing but surface syntactic variation, and the
only time that helps is when you're writing JSON by hand.  (Comments can
be handled using conventional object keys.)

Paul Hoffman scripsit:

> This appears to only be meant to work in a Javascript program,
> yes? Otherwise, what the heck does "Object keys can be unquoted if
> they're valid identifiers" mean?

It means just what it says: that you can omit the quotes around a JSON5
key if it happens to also be a valid JavaScript identifier.  The only
reason this isn't already so is that the inventor of JSON didn't want
to burden the definition of JSON with the list of 57 JavaScript reserved
words (as of ES3) that can't be identifiers.

In ES5 this isn't a problem any more, but there's a lot of legacy ES3.

By Elbereth and Luthien the Fair, you shall
have neither the Ring nor me!  --Frodo