From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Accept alists when serializing JSON Date: Tue, 26 Dec 2017 20:46:30 +0000 Message-ID: References: <20171218202633.94376-1-phst@google.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c062a58475c2c05614461d9" X-Trace: blaine.gmane.org 1514321146 11916 195.159.176.226 (26 Dec 2017 20:45:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 26 Dec 2017 20:45:46 +0000 (UTC) Cc: Philipp Stephani , emacs-devel@gnu.org To: Vibhav Pant Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 26 21:45:41 2017 Return-path: Envelope-to: ged-emacs-devel@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 1eTw6S-0002Mz-D3 for ged-emacs-devel@m.gmane.org; Tue, 26 Dec 2017 21:45:36 +0100 Original-Received: from localhost ([::1]:56505 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eTw8R-0001yL-5u for ged-emacs-devel@m.gmane.org; Tue, 26 Dec 2017 15:47:39 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45662) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eTw7W-0001mv-Tj for emacs-devel@gnu.org; Tue, 26 Dec 2017 15:46:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eTw7W-0003kL-5g for emacs-devel@gnu.org; Tue, 26 Dec 2017 15:46:42 -0500 Original-Received: from mail-qk0-x231.google.com ([2607:f8b0:400d:c09::231]:41906) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eTw7W-0003k9-0E for emacs-devel@gnu.org; Tue, 26 Dec 2017 15:46:42 -0500 Original-Received: by mail-qk0-x231.google.com with SMTP id a8so7137644qkb.8 for ; Tue, 26 Dec 2017 12:46:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=udllWEvVJfQVLPBPtqpHvf1KixY/jsxnHr5ip0Y4dXk=; b=aKc0BjzsA/XJGUDp5PsI85C2lb17HPiE1YG8m/Y1L7GlzEND9N0DXHyRdt0xxup7w0 XjyYFA7JY2pjIvWfwMz6As+mamFLYmTY1fLZZiKODK7V8AVfYxxoufxd7Ih9WEt/1FBa cl0H2g8TwB8E0Ib3URa49cUxk49rZMukZT8YK143xDOItgw00OUDyH6RjIz9DLqo0LBK Ue3mv1+lVkZzP0+hltBGVGq1FByDFtpViRPovbrgxxtl70c5engoyyhOAaUkav7YtqnD mFQu2ZGjMw0l3WoAL8K72niBPu1HJqR/wBSfCkBnXZp8rktiAgxGqmGzdky0kWqdCmw5 1vYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=udllWEvVJfQVLPBPtqpHvf1KixY/jsxnHr5ip0Y4dXk=; b=NGXo9pYy2yE9MVUNJQsRAMNuRBVm0IL0Nl3d8ZUAMfjKCHiIE3znZnRLn+EEFVxS5f EX7Y08YDPs8GTCr7UJygyv1k4eI+9eWv/OhD/fzHaa4vzCzXnCO5esgq6QNQ9Wl4Irgv jgQEQpTemhcPh+JgNp9kFXudDWWUq4utrwPDjWz0PbT1kiY3XJyx+SSkiqUdDpGb3U0G VR7MvVafKbes1jAHedwiTHZ306H8kB/NXtn4aCgrYzoBLFy65XF8ck13UQKFXfpN1ZSw U59zkz4RZcBEibER6GWRR2nKYwMANLvTjO3Aq41SneoCuvUM4wlZYe+qchXXlBVAoFML +b9w== X-Gm-Message-State: AKGB3mLKoH0X1Nm4vbXAZusuk3sYGlxxYQrX6VuGV6oRNf3YUAigioqd iTHiwzN/P04neuBLu/7ybqeNXImR2dpyIC6eYtU= X-Google-Smtp-Source: ACJfBoshdPyRTgEa4doLpYluQhIod16qDnEP0zp3GLYlkwC5YK75iAmVaQAC3lY1gBbOSkSVimSeHwL7D15LbJyG7zw= X-Received: by 10.55.122.134 with SMTP id v128mr34777735qkc.354.1514321201288; Tue, 26 Dec 2017 12:46:41 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::231 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:221426 Archived-At: --94eb2c062a58475c2c05614461d9 Content-Type: text/plain; charset="UTF-8" Vibhav Pant schrieb am So., 24. Dez. 2017 um 18:16 Uhr: > My motivation behind plist support was to achieve feature parity with > json.el, so that `json-serialize` could be used as a drop in replacement in the > future. > I don't think that should be a goal. Interfaces should be kept minimal and simple. The json.el interface already does "too much", even allowing to generate invalid JSON (e.g. by setting json-encoding-separator to something meaningless). We should only implement features if there's a clear, demonstratable benefit, not just because some other library has them. Libraries parsing or generating JSON do so to conform to some API and need to process the respective Lisp objects anyway to adapt them to whatever they want to do with the data. It's OK to make them use :false etc. explicitly without possibility of customization. --94eb2c062a58475c2c05614461d9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Vibhav= Pant <vibhavp@gmail.com> sc= hrieb am So., 24. Dez. 2017 um 18:16=C2=A0Uhr:
My motivation behind plist support was to achieve feature par= ity with json.el,=C2=A0
so that `json-serialize` could be used as a drop in replacement in the futu= re.

I don't think that should be a = goal. Interfaces should be kept minimal and simple. The json.el interface a= lready does "too much", even allowing to generate invalid JSON (e= .g. by setting json-encoding-separator to something meaningless). We should= only implement features if there's a clear, demonstratable benefit, no= t just because some other library has them.
Libraries parsing or = generating JSON do so to conform to some API and need to process the respec= tive Lisp objects anyway to adapt them to whatever they want to do with the= data. It's OK to make them use :false etc. explicitly without possibil= ity of customization.
--94eb2c062a58475c2c05614461d9--