Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124093 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id A290C1A009C for ; Sun, 30 Jun 2024 13:44:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719755126; bh=YyXgMEr2WyZT89AXN8NcM0UXFnBVJZqlTm2CaaeliUE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=W1p1OAYZQFE9BrgWM2HWc4tvmirBUCgLZEgtCV8JLdpyZbzjgjcYP+BwgQZjI+nk6 LuW15F/7WhAgSfFDliFEBhaOvxSDuylkhUzsn19dMQ3s/ADcKqLMlR5E7Pa1m7PYFv Bbb2Jf4g5k90ikHC3nm5N3wLjNHe5OayNurxRwlUOPdHng4o5yUZ6zu4MORCwX+z/g ya0R9+GKa8IySic3sHuMHka723LTYWq4p2CyxKfcL67bbE1CNJNeQqm/y/vY8yyBGK unKesIP1MKvqlk4IiDs088aztlC+ZPx8VeFSyNjwqpd1twd78em5NnHRXHWSffD8Fh M/BIcOs3k6NCQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id ADDDC1805AC for ; Sun, 30 Jun 2024 13:45:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-ua1-f42.google.com (mail-ua1-f42.google.com [209.85.222.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sun, 30 Jun 2024 13:45:24 +0000 (UTC) Received: by mail-ua1-f42.google.com with SMTP id a1e0cc1a2514c-80fc528a4ccso525215241.0 for ; Sun, 30 Jun 2024 06:44:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719755044; x=1720359844; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=YyXgMEr2WyZT89AXN8NcM0UXFnBVJZqlTm2CaaeliUE=; b=RT0voiXXfkAbhRDUMW9EuMnnmr5HOLV1UhvS1uUH/XqQNX7tg7qz2DjwKRDE9jjip6 SRTVYp/X4jZXZ9Zr7jk8yQn1EX8h7b9ncjltr/yel2gCV4Ismb3Dudj3nCs3Y6FZohYd HOkZYhyIjTE82wZzXGmgtj4Vu0swqwE2DnFlDKaT8YX70VudereooDRCgVCPAfy/yh6d Sg3nSP2Fp96CKDH8JZTBvopMy3okb89nZnxQzbSIBoc+okxFZleB3MFR4yf82npKppCn Qk5bzpFlrDtsRE7Q5wM90fYLsCI51Ud02s4X1dHGMC2kqbF8TL+WQ4jVNy2lffMb1WMd MMhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719755044; x=1720359844; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YyXgMEr2WyZT89AXN8NcM0UXFnBVJZqlTm2CaaeliUE=; b=r1S6yQXUir4ribcLznT3IykNWc72DW4+p0p/Cy7FsBl7ta+keSEFfGG0mvlSQbRik+ DgOqAAnyz7n9OfmNQoVg9NucLeRhAxUnlIo3zBgK5Xz8Sjf0+fPDkO14yXgIG4MkTSwA xbBvcty8Fo2DZ7GF4aDgqRmWK6oKUcm1Dzy3DqGpBOug6XyIEOK8ohOV4GwPJdMKUxUl dMryexBUe/UlfkpdBNdw7+Bvsyx+xi8rapeXUbHSlm/WZhCCFHUs60Q4HFED4mS6XfeK Pc0RgROCtGqumyB4LhE/G1FXQQA17w0It46jRwvBsJs3O/tut2JnSrhf5PzfGnWR0Vlx 9MPA== X-Forwarded-Encrypted: i=1; AJvYcCW73x85QYnbBU4ewyWjiq4HDHNQIMt0N+MSILHBAX2q8HfG2sOaGQDzlUcHyzNMMiPP8IUR7Fm3Fj3Nmw3sUuAniNikBD3d6Q== X-Gm-Message-State: AOJu0YykrWBYAq0mVwSjKt/aIpbYwE3vGN4IwIWpbi6shlbArCazBN5O 85Hl4pmpMVpKP9KEpbhqjwDn8bO7zXGnpCHP5VkA7rQxwms7Ex1loe8otek20+rQBMB905r5yGC +h+ljzo/EJZcWVrZACgrFdClcoaU= X-Google-Smtp-Source: AGHT+IGadHboXCN9V48yLQZHUqNzog/mh13UAT5raJiIXPBpi9bZWFXRxjx9HnQrJsepEUCS7fO3yyXBrtsTssBdDps= X-Received: by 2002:a05:6122:2687:b0:4ef:5b2c:df41 with SMTP id 71dfb90a1353d-4f2a56adf11mr3269258e0c.9.1719755043870; Sun, 30 Jun 2024 06:44:03 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: <66420855-9900-48a8-9964-b9dda81a8bdc@bastelstu.be> In-Reply-To: <66420855-9900-48a8-9964-b9dda81a8bdc@bastelstu.be> Date: Sun, 30 Jun 2024 10:43:53 -0300 Message-ID: Subject: Re: [PHP-DEV] [RFC][Discussion] Enhance JSON error messages To: =?UTF-8?Q?Tim_D=C3=BCsterhus?= Cc: "Gina P. Banyard" , PHP Internals List Content-Type: multipart/alternative; boundary="0000000000007d9e88061c1bacee" From: dev.juan.morales@gmail.com (juan carlos morales) --0000000000007d9e88061c1bacee Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable El El dom, 30 de jun. de 2024 a la(s) 09:02, Tim D=C3=BCsterhus escribi=C3=B3: > Hi > > On 6/28/24 15:49, juan carlos morales wrote: > > Suggested by Jakub Zelenka (the main arquitect of the JSON part in php > > basically), in the PULL REQUEST is better to create a brand new > > function to have detailed error messages when json encoding, decoding, > > validating, fails. > > For the folks following along, I've commented on the PR. I think that > improving the existing messages is the right choice, not adding new > functions that users will need to remember to use. > > Best regards > Tim D=C3=BCsterhus > Thanks for writting Tim. So, what I see here in my shortexperiencie is an RFC with 3 Options 1) Enhance the error message we already have 2) keep json_last_error_msg as it is and add a new function json_last_error_info function 3) both And let the voting to decide That is what I see so far Is evident that everyone agrees is a helpful feature to have better error understandind --0000000000007d9e88061c1bacee Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


El El dom, 30 de jun. de 2024 a la(s) 09:02, Tim D=C3=BCste= rhus <tim@bastelstu.be> escri= bi=C3=B3:
Hi

On 6/28/24 15:49, juan carlos morales wrote:
> Suggested by Jakub Zelenka (the main arquitect of the JSON part in php=
> basically), in the PULL REQUEST is better to create a brand new
> function to have detailed error messages when json encoding, decoding,=
> validating, fails.

For the folks following along, I've commented on the PR. I think that <= br> improving the existing messages is the right choice, not adding new
functions that users will need to remember to use.

Best regards
Tim D=C3=BCsterhus

Than= ks for writting Tim.

So, what I see here in my shortexperiencie is an R= FC with 3 Options

1) Enh= ance the error message we already have

2) keep json_last_error_msg as it is and add a new function = json_last_error_info function

3) both=C2=A0


=
And let the voting to decide=C2=A0



That is what I see so far=C2=A0

=

Is evident that everyon= e agrees is a helpful feature to have better error understandind=C2=A0 --0000000000007d9e88061c1bacee--