all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Yuri Khan <yurivkhan@gmail.com>
To: Barry Margolin <barmar@alum.mit.edu>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: Hack for JSON sequences with trailing commas?
Date: Wed, 1 Aug 2018 14:22:41 +0700	[thread overview]
Message-ID: <CAP_d_8XFNG9g1szcN-6n1W9VZNXB43ZmRY-1+izOuS+8x+T2SA@mail.gmail.com> (raw)
In-Reply-To: <barmar-173741.02532201082018@reader.eternal-september.org>

On Wed, Aug 1, 2018 at 1:55 PM Barry Margolin <barmar@alum.mit.edu> wrote:

> JSON is a very limited subset of Javascript notation for literals. […]
>
> For instance, Javascript allows both single and double quotes to be used
> as string delimiters, but JSON only allows double quotes. Javascript
> allows object keys to be written without quoting them if they're valid
> JS names, JSON requires all keys to be quoted. And JS allows trailing
> commas, JSON doesn't.

More importantly, Javascript allows comments and string concatenation
expressions, while JSON doesn’t. Which makes it a really bad choice
for hand-written configuration files.



  reply	other threads:[~2018-08-01  7:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.4482.1533056121.1292.help-gnu-emacs@gnu.org>
2018-08-01  6:53 ` Hack for JSON sequences with trailing commas? Barry Margolin
2018-08-01  7:22   ` Yuri Khan [this message]
2018-08-01  9:58     ` Skip Montanaro
2018-08-01 14:40   ` Drew Adams
     [not found]   ` <mailman.4559.1533134429.1292.help-gnu-emacs@gnu.org>
2018-08-02 22:42     ` Barry Margolin
     [not found]       ` <mailman.4627.1533257510.1292.help-gnu-emacs@gnu.org>
2018-08-04 23:12         ` Barry Margolin
     [not found]     ` <<barmar-81F7D5.18423702082018@reader.eternal-september.org>
2018-08-03  0:51       ` Drew Adams
2018-07-31 16:58 Skip Montanaro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAP_d_8XFNG9g1szcN-6n1W9VZNXB43ZmRY-1+izOuS+8x+T2SA@mail.gmail.com \
    --to=yurivkhan@gmail.com \
    --cc=barmar@alum.mit.edu \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.