From unknown Thu Aug 14 17:18:42 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#72941 <72941@debbugs.gnu.org> To: bug#72941 <72941@debbugs.gnu.org> Subject: Status: jsonrpc: Check if parameters are in line with the spec Reply-To: bug#72941 <72941@debbugs.gnu.org> Date: Fri, 15 Aug 2025 00:18:42 +0000 retitle 72941 jsonrpc: Check if parameters are in line with the spec reassign 72941 emacs submitter 72941 Felician Nemeth severity 72941 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 01 17:47:13 2024 Received: (at submit) by debbugs.gnu.org; 1 Sep 2024 21:47:13 +0000 Received: from localhost ([127.0.0.1]:40860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sksPf-0008Dz-1Z for submit@debbugs.gnu.org; Sun, 01 Sep 2024 17:47:13 -0400 Received: from lists.gnu.org ([209.51.188.17]:50570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sknPz-0005cR-4L for submit@debbugs.gnu.org; Sun, 01 Sep 2024 12:27:13 -0400 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 1sknP1-0003VB-4G for bug-gnu-emacs@gnu.org; Sun, 01 Sep 2024 12:26:11 -0400 Received: from anubis.tmit.bme.hu ([152.66.245.198]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sknOz-00074T-35 for bug-gnu-emacs@gnu.org; Sun, 01 Sep 2024 12:26:10 -0400 Received: from localhost (localhost [127.0.0.1]) by anubis.tmit.bme.hu (Postfix) with ESMTP id D783533D6A for ; Sun, 1 Sep 2024 18:26:03 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at tmit.bme.hu 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 8Gr-sycWEBlY for ; Sun, 1 Sep 2024 18:26:02 +0200 (CEST) From: Felician Nemeth To: bug-gnu-emacs@gnu.org Subject: jsonrpc: Check if parameters are in line with the spec User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) X-Debbugs-Cc: Daniel Pettersson Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEX5+fmhoaEwMDD/ ///TMNVWAAAAAWJLR0QDEQxM8gAAAAlwSFlzAAAPEgAADxIBIZvyMwAAAAd0SU1FB+AICBUfHgLs gGoAAAGXSURBVCjPRdK/b5tAFAfw753gBEwM2ApMbuVIqf+Ko0qiyhOu4sj2xJBYMn/FUdX7UUUZ OjHgyvf+yj6IcW6Bjx53934ADEvs8bmEr8UVoTYTOyJO9KoYsVofN8kILdbeJ8Li6YpZWop4xOK0 VdfIoXmkHn5/5D7/Ts/8THacSqnkKTcMTxgUkVzFnEIRTKwwYYSCvzfg16f0i8YApW/XG/Pm8R49 dXjxKmRnxv3OwooQWcv4RUYem1fsNe/WU63uk7AmYxk78y32/ee2tZB4fO+WcZ7lnIGEolXW1EGw LfkSuQ0XTgRefgNlfNwRNV6QhBxJ8JNxTMUPyBqTd0bjaAP5G7NJRU39z80hLOZTjqB7K3tEEFSj aEsuQew6qBxxyhHjVUR7H7NpC9iHJZGLMCEuweqAqE1BHbfK2oRIz9EHYA/+wiFWru9smeVfuWNZ 2+NFtX80UA1TvJNdytM4DwO4kY7bJz8Qcd0G0ceslZGkkeoBsjUHwF1+jjM3XHaXEZ7mGLfwPFO+ RV9QLY2iEdmDo78D/gNPaXVYqd+pyQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxNi0wOC0wOFQyMzoz MDoyOCswMjowMGy/yHYAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTYtMDgtMDhUMjM6MzA6MjgrMDI6 MDAd4nDKAAAAAElFTkSuQmCC Date: Sun, 01 Sep 2024 18:26:02 +0200 Message-ID: <87bk17l4rp.fsf@betli.tmit.bme.hu> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=152.66.245.198; envelope-from=nemethf@tmit.bme.hu; helo=anubis.tmit.bme.hu X-Spam_score_int: 9 X-Spam_score: 0.9 X-Spam_bar: / X-Spam_report: (0.9 / 5.0 requ) BAYES_00=-1.9, FSL_BULK_SIG=0.001, RAZOR2_CF_RANGE_51_100=1.886, RAZOR2_CHECK=0.922, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 01 Sep 2024 17:47:03 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) I failed to implement an LSP extension to Eglot, because my function sent a required parameter as a string instead of an array containing a single element: the string. In the end it turned out that this was my fault, because according to the JSON specification: "If present, parameters for the rpc call MUST be provided as a Structured value. Either by-position through an Array or by-name through an Object." https://www.jsonrpc.org/specification#parameter_structures 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. Thank you. (Background: ) From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 02 08:04:58 2024 Received: (at 72941) by debbugs.gnu.org; 2 Sep 2024 12:04:58 +0000 Received: from localhost ([127.0.0.1]:46968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sl5nl-0000C1-Mq for submit@debbugs.gnu.org; Mon, 02 Sep 2024 08:04:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60108) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sl5nh-0000B6-Op for 72941@debbugs.gnu.org; Mon, 02 Sep 2024 08:04:54 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sl5CR-00074z-TD; Mon, 02 Sep 2024 07:26:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=V8kXmNErWDAkR62+1aLkzd7b7SXQDUUxLKsduxjdBio=; b=iCfvZayP7We9JBdD+AYi oSPNqZ11wwaShUOUcZfKIgV2r5X3QflhUP/h/ft/35/IEpxF1pEKgM+aYkDnJNW4vl8p/0yMLuJGl uFd9S8J2A8EpXa8vQzp8Fr3LBiTab1MSVUVtOh10XXcEMfQva9GZrPFOzN027JJtFqqzl3dysZUnT OBurCVaYwbDKfwFtI3GF+qTQfjJ7myMejlbbndFpflxGnn4PyzgCtdW4u/kOXV/3Sxo/N6ZudAfiV oY3+zHvPTM242Hj3WeMBVXcRnBWm7U0nbWNsItOvUUtNodTO8j0l7BlRCIbLuSJpLlrsnO0MWyr0g PNnNF5KqI22Tdg==; Date: Mon, 02 Sep 2024 14:26:22 +0300 Message-Id: <8634mi9u01.fsf@gnu.org> From: Eli Zaretskii To: Felician Nemeth , =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= In-Reply-To: <87bk17l4rp.fsf@betli.tmit.bme.hu> (message from Felician Nemeth on Sun, 01 Sep 2024 18:26:02 +0200) Subject: Re: bug#72941: jsonrpc: Check if parameters are in line with the spec References: <87bk17l4rp.fsf@betli.tmit.bme.hu> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72941 Cc: daniel@dpettersson.net, 72941@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: Daniel Pettersson > From: Felician Nemeth > Date: Sun, 01 Sep 2024 18:26:02 +0200 > > I failed to implement an LSP extension to Eglot, because my function > sent a required parameter as a string instead of an array containing a > single element: the string. In the end it turned out that this was my > fault, because according to the JSON specification: "If present, > parameters for the rpc call MUST be provided as a Structured > value. Either by-position through an Array or by-name through an > Object." https://www.jsonrpc.org/specification#parameter_structures > > 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. > > Thank you. > > (Background: ) Adding João. From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 05 16:45:22 2024 Received: (at 72941) by debbugs.gnu.org; 5 Sep 2024 20:45:22 +0000 Received: from localhost ([127.0.0.1]:38336 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smJM1-0000PF-PF for submit@debbugs.gnu.org; Thu, 05 Sep 2024 16:45:22 -0400 Received: from mail-ej1-f44.google.com ([209.85.218.44]:47443) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smJM0-0000P3-Ek for 72941@debbugs.gnu.org; Thu, 05 Sep 2024 16:45:20 -0400 Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a8a6d1766a7so135267866b.3 for <72941@debbugs.gnu.org>; Thu, 05 Sep 2024 13:44:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725569049; x=1726173849; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=0ZZIjU13Hjtcqc1NDdu5L3eEfqwNETF59kE4XRe0dF4=; b=oawp/AGWUVlAsxJI+RoYFcQ7aprLo0gfZ39L3WF300YyWS33s/SqLLQ964yBbcJJxQ Y/Qq1MK2Z8FSk6P2Djz3RvBZisvIMgm/XyYVEYv8dRv3HO37uMkWWVqsM4Zx4vcoW2Yf tdjH2zU9VM+m/xur8qYqiOGgATtLNUUMxpT6MQWRdGphZfxHA7szK78ImOPmDhyrkRP4 jbDSwWsWszIVnJqfVgMjrqZ8IM5E4S4OP6A62z4eBKD2weL6ARm1p9mHKDgCoJl2sUxd gPr1IaerGM7pUFaKtgIcVAhHJuhlYq3YmNSFuZROiEnD1dzn84ZykLHAZ4rAzqlnS89/ hqYA== X-Forwarded-Encrypted: i=1; AJvYcCUYnH4XAV4sVe9YaWb39AIi69EbZdLFBSPfvcJGiVXCFFoZrmkLj9ra11xGDlGurFA072EXvg==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yy7ljGKLPO0g4XIrcOvlHhfRhkiY7RC93eMyPFo+pSQvCbqPKXW kv/PmQZwdWMndYh8iJ6jDaflUuljh3eSUEzpQG0Iz3gXjEycy4Z6UxJ4jQ== X-Google-Smtp-Source: AGHT+IHeO/I2ZO7K9NIEsL+fIVgnC0f8nek0r5KfO56SWkDIawvoXlmLIQ0KD5n+iPwynxYC+kqBYQ== X-Received: by 2002:a05:6512:2202:b0:536:55ae:7444 with SMTP id 2adb3069b0e04-536587aaf27mr86533e87.22.1725568534425; Thu, 05 Sep 2024 13:35:34 -0700 (PDT) Received: from Daniels-Air (c-97c9e455.027-357-6d6c6d4.bbcust.telenor.se. [85.228.201.151]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-536572f3447sm42502e87.242.2024.09.05.13.35.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2024 13:35:33 -0700 (PDT) From: Daniel Pettersson To: Eli Zaretskii Subject: Re: bug#72941: jsonrpc: Check if parameters are in line with the spec In-Reply-To: <8634mi9u01.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 02 Sep 2024 14:26:22 +0300") References: <87bk17l4rp.fsf@betli.tmit.bme.hu> <8634mi9u01.fsf@gnu.org> Date: Thu, 05 Sep 2024 22:35:32 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 72941 Cc: Felician Nemeth , 72941@debbugs.gnu.org, =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> 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. 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. /Daniel Pettersson From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 14 02:59:19 2024 Received: (at 72941) by debbugs.gnu.org; 14 Sep 2024 06:59:19 +0000 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 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 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 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) From: Felician Nemeth To: Daniel Pettersson Subject: Re: bug#72941: jsonrpc: Check if parameters are in line with the spec References: <87bk17l4rp.fsf@betli.tmit.bme.hu> <8634mi9u01.fsf@gnu.org> Date: Fri, 13 Sep 2024 19:13:16 +0200 In-Reply-To: (Daniel Pettersson's message of "Thu, 05 Sep 2024 22:35:32 +0200") Message-ID: <87ikuzzdcj.fsf@betli.tmit.bme.hu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) 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 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 72941 X-Mailman-Approved-At: Sat, 14 Sep 2024 02:59:17 -0400 Cc: Eli Zaretskii , =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , 72941@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>> 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. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 28 04:47:58 2024 Received: (at 72941) by debbugs.gnu.org; 28 Sep 2024 08:47:59 +0000 Received: from localhost ([127.0.0.1]:51746 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1suT7O-000548-KA for submit@debbugs.gnu.org; Sat, 28 Sep 2024 04:47:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37180) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1suT7M-00053s-56 for 72941@debbugs.gnu.org; Sat, 28 Sep 2024 04:47:56 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1suT6l-0000is-88; Sat, 28 Sep 2024 04:47:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=xsBceW3VGn7x4xXDnxLx0zW8sMEjFwtv955evHHoxMQ=; b=YGuXmwKvj/oNEGdFkxqL k4/uHacIva78yg8bqYd93kIrFLFPcC9BtqrZMzTPOImG/UkLn3KR5ZfjpUtNAXUFlrVWr3tqJixvs 5QGanPb5633qdbB7/IrWrst6oKeL0a8QRrq9AfD7+7W2MbzS5/ubzTzZer3qbvoh0O+ivmcNTo+oy pYNYy9BrAThvPlqpPr0+XngNnU1wyPpRTtm0wj6AscpoO/2Pem972J53TuKO8gddvtDWxWtnvwcTn M3JC+6BsKa52zgf+mU7Y4k8vjN5W7NCNrnR7ylaQ1VRcONieDbAW/+GSft3SqmXbAXHYlwFzxThW2 xJcRlNkMKiXMig==; Date: Sat, 28 Sep 2024 11:47:13 +0300 Message-Id: <86tte06u7i.fsf@gnu.org> From: Eli Zaretskii To: Felician Nemeth In-Reply-To: <87ikuzzdcj.fsf@betli.tmit.bme.hu> (message from Felician Nemeth on Fri, 13 Sep 2024 19:13:16 +0200) Subject: Re: bug#72941: jsonrpc: Check if parameters are in line with the spec References: <87bk17l4rp.fsf@betli.tmit.bme.hu> <8634mi9u01.fsf@gnu.org> <87ikuzzdcj.fsf@betli.tmit.bme.hu> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72941 Cc: daniel@dpettersson.net, 72941@debbugs.gnu.org, joaotavora@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) So do we want to close this as wontfix? > From: Felician Nemeth > Cc: Eli Zaretskii , > João Távora > , > 72941@debbugs.gnu.org > Date: Fri, 13 Sep 2024 19:13:16 +0200 > > >>> 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. > From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 28 07:40:41 2024 Received: (at 72941) by debbugs.gnu.org; 28 Sep 2024 11:40:41 +0000 Received: from localhost ([127.0.0.1]:52020 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1suVoW-0006s5-Uy for submit@debbugs.gnu.org; Sat, 28 Sep 2024 07:40:41 -0400 Received: from mail-lf1-f47.google.com ([209.85.167.47]:57356) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1suVoV-0006qQ-7W for 72941@debbugs.gnu.org; Sat, 28 Sep 2024 07:40:40 -0400 Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-5365928acd0so3692456e87.2 for <72941@debbugs.gnu.org>; Sat, 28 Sep 2024 04:40:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727523603; x=1728128403; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=GoKWlpRS+sloPkD3Mz0ao9O/kG+Pppj5eoZtqZ+JXd0=; b=WX5FmlQLomBGPW7Xyc/wHJKambSN4FbmPH4iDlOCxXrStKZT4i1Y8bj1X2HyJtUDdC qKoxeazXU8Cd44G2skoHDYEah6aTw9AgSyc/ISSwaiA1V5t2jkdKibGpsmxvO4t7/VuQ BLAVTrd8+fPr4SL3UMcd6Gq3NEuNX+MhJDFDuQWO4YcKWdCpwqMmRSFoIy+wD/7XSRGK 6R+Nj8MwuJNx9fWOVn82Ccz0qhmpRCZGyVydnj0WLu97HqEzS4Mtfxr9SfFF03VJjjKe ZMfBs4LAFNwmLJWIZgZWPdSymsov+YuaTuhreY1cX2y+fYYpy4qkMqCPTJ+NnehHZHbn /NIg== X-Forwarded-Encrypted: i=1; AJvYcCURg9d/7VyoUzAhgoeNJ7z7ON7j9OiHWiwSLztVRY6LdGOEcWC7aL3FKB6gRBzsvoc5OWrhbQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwH8CWs4ML7yjJ3GWJcP+RNzCURM/kEARp4WHaKhew+OjOi4JkB G7gVttlrVyb+MT/Zmt/1ghokZ4kkLEiUcQtHvaDsErlqNbxgn6+NO4djkw== X-Google-Smtp-Source: AGHT+IF7U8G/NddqNMKyP0PSYoRkS7dQtbkykHFZ54Prv6nlhkKHFr6s2RmvNWYI9/cExsXDFb+niA== X-Received: by 2002:a05:6512:2813:b0:539:8f02:f55e with SMTP id 2adb3069b0e04-5398f02f694mr371148e87.33.1727523602839; Sat, 28 Sep 2024 04:40:02 -0700 (PDT) Received: from Daniels-MacBook-Air.local ([217.116.228.14]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2fac306dc8csm1635341fa.10.2024.09.28.04.40.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Sep 2024 04:40:02 -0700 (PDT) From: Daniel Pettersson To: Eli Zaretskii Subject: Re: bug#72941: jsonrpc: Check if parameters are in line with the spec In-Reply-To: <86tte06u7i.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 28 Sep 2024 11:47:13 +0300") References: <87bk17l4rp.fsf@betli.tmit.bme.hu> <8634mi9u01.fsf@gnu.org> <87ikuzzdcj.fsf@betli.tmit.bme.hu> <86tte06u7i.fsf@gnu.org> Date: Sat, 28 Sep 2024 13:40:00 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 72941 Cc: Felician Nemeth , 72941@debbugs.gnu.org, joaotavora@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Eli Zaretskii writes: > So do we want to close this as wontfix? Yes, if anybody would clarify the variable type expectations documentation that would be great but all in all this is would be wontfix. >> From: Felician Nemeth >> 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. It seams like something that would be a bit of mess and I would expect that an sane jsonrpc server would include the reason for error in the error response. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 02 08:59:39 2024 Received: (at 72941) by debbugs.gnu.org; 2 Oct 2024 12:59:39 +0000 Received: from localhost ([127.0.0.1]:56859 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svyx6-0006wW-KK for submit@debbugs.gnu.org; Wed, 02 Oct 2024 08:59:39 -0400 Received: from anubis.tmit.bme.hu ([152.66.245.198]:42770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svxjE-0002ic-2D for 72941@debbugs.gnu.org; Wed, 02 Oct 2024 07:41:13 -0400 Received: from localhost (localhost [127.0.0.1]) by anubis.tmit.bme.hu (Postfix) with ESMTP id C26CD33D5F; Wed, 2 Oct 2024 13:41:08 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at tmit.bme.hu 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 rr4gbAENyScq; Wed, 2 Oct 2024 13:41:07 +0200 (CEST) From: Felician Nemeth To: Daniel Pettersson Subject: Re: bug#72941: jsonrpc: Check if parameters are in line with the spec References: <87bk17l4rp.fsf@betli.tmit.bme.hu> <8634mi9u01.fsf@gnu.org> <87ikuzzdcj.fsf@betli.tmit.bme.hu> <86tte06u7i.fsf@gnu.org> Date: Wed, 02 Oct 2024 13:41:06 +0200 In-Reply-To: (Daniel Pettersson's message of "Sat, 28 Sep 2024 13:40:00 +0200") Message-ID: <8734len359.fsf@betli.tmit.bme.hu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) 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 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 72941 X-Mailman-Approved-At: Wed, 02 Oct 2024 08:59:35 -0400 Cc: Eli Zaretskii , joaotavora@gmail.com, 72941@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Daniel Pettersson writes: > Eli Zaretskii writes: > >> So do we want to close this as wontfix? > > Yes, if anybody would clarify the variable type expectations > documentation that would be great but all in all this is would be > wontfix. I can accept this decision. >>> From: Felician Nemeth > >>> 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. > > It seams like something that would be a bit of mess and I would expect > that an sane jsonrpc server would include the reason for error in the > error response. The server I used did not return an error message, from which I could easily understand the real problem. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 12 07:22:13 2024 Received: (at 72941-done) by debbugs.gnu.org; 12 Oct 2024 11:22:13 +0000 Received: from localhost ([127.0.0.1]:38907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1szaCH-00073g-Jf for submit@debbugs.gnu.org; Sat, 12 Oct 2024 07:22:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40054) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1szaCF-00073M-M2 for 72941-done@debbugs.gnu.org; Sat, 12 Oct 2024 07:22:08 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1szaBt-0005IB-IK; Sat, 12 Oct 2024 07:21:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=+xcF5hXJh/2hTkFqj+jnIf9K8f2489PQZS1k/cE6onE=; b=KYtpyJwJqwDC kB0NErIsrK2dK8gFML4hHB+iiEEDK1xFJSW3MiNI00egebPn+1GJPokSr94PPKl0BRZapVhDZ3fhs pfTRavTm2rDz3ZfywBauayxk+mJhCn6OijsOfTFPkAq2DobREBh6fPMyAofLMqtKFMVIzAIf+lntc kjJAVNP8qykvzOOT9N/wPfKr0zKh4lwZxymIUMBQhETTIATZYJ8/XO82QWSfyqz0ZY8k5YKAUvJwS QvDl7fBtN2dsfkZ14n/x36xyjV0it+QrNavKLfR+VfKLlfNLa0SBaaLSn77QjQ7kskOzqq0XL7/wO OfbDkObj1ONApNc/SUkmWA==; Date: Sat, 12 Oct 2024 14:21:42 +0300 Message-Id: <864j5hy3ax.fsf@gnu.org> From: Eli Zaretskii To: Daniel Pettersson In-Reply-To: (message from Daniel Pettersson on Sat, 28 Sep 2024 13:40:00 +0200) Subject: Re: bug#72941: jsonrpc: Check if parameters are in line with the spec References: <87bk17l4rp.fsf@betli.tmit.bme.hu> <8634mi9u01.fsf@gnu.org> <87ikuzzdcj.fsf@betli.tmit.bme.hu> <86tte06u7i.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72941-done Cc: nemethf@tmit.bme.hu, 72941-done@debbugs.gnu.org, joaotavora@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Daniel Pettersson > Cc: Felician Nemeth , joaotavora@gmail.com, > 72941@debbugs.gnu.org > Date: Sat, 28 Sep 2024 13:40:00 +0200 > > Eli Zaretskii writes: > > > So do we want to close this as wontfix? > > Yes, if anybody would clarify the variable type expectations > documentation that would be great but all in all this is would be > wontfix. > > >> From: Felician Nemeth > > >> 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. > > It seams like something that would be a bit of mess and I would expect > that an sane jsonrpc server would include the reason for error in the > error response. No further comments, so I'm now closing this bug. From unknown Thu Aug 14 17:18:42 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 09 Nov 2024 12:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator