From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: Hack for JSON sequences with trailing commas? Date: Thu, 02 Aug 2018 18:42:37 -0400 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1533249805 6341 195.159.176.226 (2 Aug 2018 22:43:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 2 Aug 2018 22:43:25 +0000 (UTC) User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 03 00:43:21 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1flMJU-0001Z3-H6 for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Aug 2018 00:43:20 +0200 Original-Received: from localhost ([::1]:48204 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1flMLb-00068t-7Z for geh-help-gnu-emacs@m.gmane.org; Thu, 02 Aug 2018 18:45:31 -0400 Original-Path: usenet.stanford.edu!goblin3!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!2a00:1d38:fa:feed::184.MISMATCH!feeder4.usenet.farm!feed.usenet.farm!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!barmar.motzarella.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 29 Original-Injection-Info: barmar.motzarella.org; posting-host="24a3a186541a8435ec9ab54fd1ed402c"; logging-data="2878"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+efsgEo867aebDSLQMDVZo" Cancel-Lock: sha1:sHttOs06hEAnO3anliLBbeDV3pw= Original-Xref: usenet.stanford.edu gnu.emacs.help:223502 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:117627 Archived-At: In article , Drew Adams wrote: > > JSON is a very limited subset of Javascript notation for literals. Many > > things that are allowed in Javascript source code are not allowed in > > JSON. The reason is presumably to simplify the design of JSON parsers -- > > they don't have to deal with all possible input formats. > > Yes, but there is a difference between JSON as defined by its standard > and JSON as it is used in practice in many situations. The former is more > strict than the latter. > > Here is one description of possible differences between the strict syntax > of the standard and a lax syntax (one that does allow an extra, final comma): > > https://docs.oracle.com/en/database/oracle/oracle-database/18/adjsn/conditions > -is-json-and-is-not-json.html#GUID-1B6CFFBE-85FE-41DD-BA14-DD1DE73EAB20 I think Oracle is unusual in being so permissive. I don't think the JSON parsers in PHP, Python, or Javascript allow as much as Oracle does. I think the only common extension to JSON that was commonly allowed was allowing the top-level value to be something other than an object or array. The JSON spec was recently updated to legitimize this. -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***