help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hack for JSON sequences with trailing commas?


From: Yuri Khan
Subject: Re: Hack for JSON sequences with trailing commas?
Date: Wed, 1 Aug 2018 14:22:41 +0700

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 via email to

[Prev in Thread] Current Thread [Next in Thread]