From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Felician Nemeth Newsgroups: gmane.emacs.bugs Subject: bug#72941: jsonrpc: Check if parameters are in line with the spec Date: Fri, 13 Sep 2024 19:13:16 +0200 Message-ID: <87ikuzzdcj.fsf@betli.tmit.bme.hu> References: <87bk17l4rp.fsf@betli.tmit.bme.hu> <8634mi9u01.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17677"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Cc: Eli Zaretskii , =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= , 72941@debbugs.gnu.org To: Daniel Pettersson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 14 09:00:20 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1spMlX-0004Rx-OP for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 Sep 2024 09:00:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1spMlB-0004e1-Kb; Sat, 14 Sep 2024 02:59:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1spMl8-0004dJ-Bq for bug-gnu-emacs@gnu.org; Sat, 14 Sep 2024 02:59:54 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1spMl8-0005cO-3B for bug-gnu-emacs@gnu.org; Sat, 14 Sep 2024 02:59:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:In-Reply-To:Date:References:From:To:Subject; bh=k1DBFFPFaZB2HVhLE+yGBs651a8cdxKOPMRWzGHU+1A=; b=Hj/Km5Xtxcon/DgLxEEkrmm6Aav+byCoC0y4uBKBtr9IkbwYLEkKrG5+SeplEhV8NqK2cS1kTqA780I9xJw9+Sqz43YM+J1ywmFM6XUNtOEnYDpWsXZj+dS2I65xLefkZtKOUN+RIuVHosbMdMsFjMhL+OSySKMMBDTetInESeHDj9RhoxYHFiElv18X1YxeY2idRwLheMmIVED3+N4P8Zm4baGh0VQaPtCrDs4/y+X3fbCeIlCu9Aq2+dNMrb6Ov2b+iWVDWwOyAeW8UFMxC8kf4sSJHQ0SkFoyFgZG6o6MC4GZTKdT+gAuctbwjKn7dZIJ8HKH3S5GCbsthbk0TA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1spMlI-0000fz-2d for bug-gnu-emacs@gnu.org; Sat, 14 Sep 2024 03:00:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Felician Nemeth Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Sep 2024 07:00:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72941 X-GNU-PR-Package: emacs Original-Received: via spool by 72941-submit@debbugs.gnu.org id=B72941.17262971592433 (code B ref 72941); Sat, 14 Sep 2024 07:00:04 +0000 Original-Received: (at 72941) by debbugs.gnu.org; 14 Sep 2024 06:59:19 +0000 Original-Received: from localhost ([127.0.0.1]:44576 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1spMkY-0000d9-EC for submit@debbugs.gnu.org; Sat, 14 Sep 2024 02:59:18 -0400 Original-Received: from anubis.tmit.bme.hu ([152.66.245.198]:59711) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sp9rP-00045v-Sh for 72941@debbugs.gnu.org; Fri, 13 Sep 2024 13:13:32 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by anubis.tmit.bme.hu (Postfix) with ESMTP id 9F4BC33DA8; Fri, 13 Sep 2024 19:13:18 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at tmit.bme.hu Original-Received: from anubis.tmit.bme.hu ([127.0.0.1]) by localhost (anubis.tmit.bme.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BXaOd81XbtPs; Fri, 13 Sep 2024 19:13:17 +0200 (CEST) In-Reply-To: (Daniel Pettersson's message of "Thu, 05 Sep 2024 22:35:32 +0200") Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEWOdXElERN7LDLZs6/l 0dDQq6TepMcqAAACW0lEQVQ4jWWSzY7bMAyEaSm6mypylxjkroTRvUW8d9lavf+r7NDOZotWQHzg lyGHP0Sn5ed9qKrLWWIWos9/QJWIeCSywPNTd/AE0LtwFj7A+3WT5PwfeBrQKcsBnkfwVcNySWQr 3i34XN6gRNgis/v4uwSKHCD9lPitB0Aq9BHfHX4cgsI7cJJfLdZg/4bbCzoRmkD9MsagQSBDedZi CgNxkVSJmSOStTBUBKkywEnEoZzbwWj+ACiVJkF6pOpak2PMCqkMYDpaw+gatLR8atMOrB3JGzmm 3rSQo+tkxU+UAbhQSgtslULhsXKk6+IyQ1QTzeQB0MzjlpkCEUCeUdviWrwBcxVqpZjP+v0MYPA0 aq2rvIEZe4GRM0v+9QIB03rsABVSk5y+Mz3LSzExtJLlCCO6dV1uzDQFTBad+gO0TqqL9XE8x4ek +orvYiMJgzC8e+r6TqaPaK6QyqVNvoHtsRrooQ6tTi4vgaSkd8wIikodB3B0iIk58avsDdYNajpS bSKJ+mQnipGszB6zW4lGgsOkKHE2RWVcBpwhaIv3BYIAu3WsnC7YYKLRchp6w8fRGZIWiZuFsVai 7gbcUcJEhiDZ3K1+uzZvBlfaEO8oH4MLu6/hrKVM7QpQcIXJFuC1XjfbfKRxNslk94l9cYcEihV2 HWyNDQAXaLsvnrSyp7HaQhrAn13V6/XW11nh0XINBOEAV+tHK4EvAGNGvEwc0eZw8Vyr56imYEsV sOW9jxm/yb9AH1ufqGMviIK7A0Tc/723oM3tJ4HTOu9gDr3ftbdkxfdjsUv5AqWKwyfCYo5WAAAA AElFTkSuQmCC X-Mailman-Approved-At: Sat, 14 Sep 2024 02:59:17 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:291686 Archived-At: >>> Would it be possible to extend jsonrpc.el to check the params argument >>> of jsonrpc-request, jsonrpc-notify, and jsonrpc-async-request whether it >>> is a structured value? And if it is not, then guide the programmer to >>> the above URL with a warning. > > The use case makes sense to me, but I would go with updating the docs > rather then the API. The current wording could use some love as it's > refereed to as JSON object or plist (at different functions). When it > should be plist or vector, where we could throw in a link to the > specification. Makes sense. > I am not for signaling an error or similar as it's a breaking change in > my book, which does not seam called for in this case. Maybe when the server responds with an error to a jsonrpc-request, then jsonrpc.el could create an additional warning if the params of the request was not structured. Or maybe it is too much work for a very small gain. Thank you.