Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118493 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 49352 invoked from network); 26 Aug 2022 09:26:43 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 26 Aug 2022 09:26:43 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 51FDC18050B for ; Fri, 26 Aug 2022 02:26:43 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-ua1-f47.google.com (mail-ua1-f47.google.com [209.85.222.47]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 26 Aug 2022 02:26:43 -0700 (PDT) Received: by mail-ua1-f47.google.com with SMTP id i5so357271uat.6 for ; Fri, 26 Aug 2022 02:26:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc; bh=j2op/2fNNU1z9Jsyo+BwBhYymNxwOL77nhmh34E0CJI=; b=J5Ix+UN+hQBARmiOGKXQtORI41Bjx2tPqcnIVu9lylzrfnrXF/dfYTD34NNTLBQRm8 rSzaT9TzmSNGyLuXikLWqRfUf4Q1WnW+xfiT24xi1DK4r0HU+3DL1GIZvob0UVuEvKDW Ior84/k/o8mT0C5bKbQKIMH8STTtnyPm9GiIearxWOcHv0tSFydzDrku32uzHHv3jr5n n6hjtBZXbO948xoHGko95r/lG8DIxoT/LBJlnrrcqZNm9+xeT9lXS5Luhsdr4difh14X ShB3up/4nOHDs4sAuosqvmQNIrK6b3Dwpx9MpoYXezy30VfGl68Brk4CAAV+E7e+1j2W jjhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc; bh=j2op/2fNNU1z9Jsyo+BwBhYymNxwOL77nhmh34E0CJI=; b=eWvmXEtg0O+rj+rcL/nc6FtB2kBOyVo2dd5nBn6Fp9MIGMjzNWQBmC5RN7t6g+gyg9 3YxgyZ2QlRdHMPzddPwEXhjr9A/tgzORDwRfc+WOIP75zsa01mBMRkcG/sdD4kdA3Tme KSXK7uJKYAHR+v1NLULZDlcXLcFH4ybE48p+P3OWjnwoO3Xy901+614ukt6QllGgfOjs fSeBEDgTvYeLYQffMvsF+QFRXMVezxSXpMj7Fs13/3acNlGT9l8TxNAFUxh1kWUmpIRc GKkuJiOZVqaZ9vhs4D0pBsgijLoK099Wkcupe7NhxG8b9BYxauitf42qar8gcs4ddRoS p0JQ== X-Gm-Message-State: ACgBeo3k3ji7Du+03WZ+Ai+cX7+SGeufa07qY5mqwIRlv6sfQCEsbFqv mZfwpLdUmCAQHGtjE0beyAeLmi0J+tLvnLfAzWU= X-Google-Smtp-Source: AA6agR5WCtPcqzMTfyHlkuvE/aZ5fdHxo3qYf6GKRnDhQzOCcdajTH9hcL1UQTZ9tGJVeALeNrRxeBfM8K7z+ukjrDc= X-Received: by 2002:a05:6130:c17:b0:391:293d:f1ff with SMTP id cg23-20020a0561300c1700b00391293df1ffmr3009183uab.101.1661506002543; Fri, 26 Aug 2022 02:26:42 -0700 (PDT) MIME-Version: 1.0 References: <8D53AD5B-7CFC-4820-9EE4-FEB365D327A8@woofle.net> In-Reply-To: Date: Fri, 26 Aug 2022 11:26:31 +0200 Message-ID: To: =?UTF-8?Q?Micha=C5=82_Marcin_Brzuchalski?= Cc: Dusk , David Gebler , PHP Internals List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] RFC json_validate() - status: Under Discussion From: dev.juan.morales@gmail.com (juan carlos morales) El vie, 26 ago 2022 a las 11:00, Micha=C5=82 Marcin Brzuchalski () escribi=C3=B3: > > A `json_decode()` is a substitute that IMO solves 99% of use cases. > If I'd follow your logic and accept every small addition that handles 1% = of use cases, somebody will raise another RFC > for simplexml_validate_string or yaml_validate and the next PhpToken::val= idate. > All above can be valid if we trust that people normally validate 300MB pa= yloads to do nothing if they DON'T fail and there is nothing strange about = that. > > Cheers, > How can you make such an assertion in those numbers (99% of use cases and son on, that you mention) ? Can you give us more information about this assertions? I have provide real examples where the need to validate-only a json-string is actually needed, also the need from our developers community asking for this. RFC: https://wiki.php.net/rfc/json_validate Implementation: https://github.com/php/php-src/pull/9399