Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118494 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 50894 invoked from network); 26 Aug 2022 09:31:56 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 26 Aug 2022 09:31:56 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0C28518050B for ; Fri, 26 Aug 2022 02:31:56 -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=-0.7 required=5.0 tests=BAYES_05,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-vk1-f169.google.com (mail-vk1-f169.google.com [209.85.221.169]) (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:31:55 -0700 (PDT) Received: by mail-vk1-f169.google.com with SMTP id n28so400406vkm.5 for ; Fri, 26 Aug 2022 02:31:55 -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=ygGCSaiEg/cw9dC7uV8Vxz7L5BWaLplWXqoVGUyi3xs=; b=Kz4KqbZECVl9S7xoqT4WWVe4pgQdp481LgGV7vTPvaacP2OK5RTB6Wllxcd8ntEb7W iFlFd4AwNm5bi3FwcV56HcrHL/mEc0PsIJfnP6hYnDzH7TRAA/iQz/nNb04nDXR8V/80 WPQ/qMYg+9Vvd36HzOdkZBPM3wWbXGt2mAV6MpAZfV44pZbMP/GRCQ9z55jhRAS5bkU5 9hazI6blsVkrgHPl4ekw8eorGfs5v+1Km8fQ7yXgw1M3wqPz+NI9sc1GfGCBOnTgLJ87 k3xUp8NH/XIvr5NdwGvfmoLDHQla7ZtuZUmPEqk4kVF1OSQKz68uA1JZ0nUtcEvgV112 17iw== 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=ygGCSaiEg/cw9dC7uV8Vxz7L5BWaLplWXqoVGUyi3xs=; b=Jolp6G2svoC2joNc/4ANgddpf0UZ35MbVCWowSYBY0GdpIJY+ucLHC/DFNJfqdfkK7 e/llhr+4r873WhMkuLocGVgDurx6H0ATObtsVshgTxj7UUGT81T/AmIefTL2mkpL1BL1 pmdCnJ4lE4qAwDL3Qr2XToUPTLyb/NtdTk8YrM0KIs6+exgH9CndsMdlQxvrq97m679O 5ZkR4X/zXgoN+lDTxtInCDKNmo7YqAjuxdeIzfCls2fXZx2ZfU/KicUnk9EelTkgJuee tfNucoqA2tFDbS+X98hy3N8mW78ezLMbX8p+HvWciwiXuPeVLtuYVUuJod0N+ArrVZTc ShEw== X-Gm-Message-State: ACgBeo0wjYr4WvJ64a0iFUT3cL5s1JCgYgeVSceb0RAEIl+Z4v5EMl6s V5G3+cgyRLs8KBly9hhIOU4HGgPDhATCeT8BZbc= X-Google-Smtp-Source: AA6agR6hOiLOGfL6e9k2ZNqY84z8kwJWVPa2UWYtctBkpxAY42kuZ8UIaQmSCGxEy9KgujQVPq8RGOkQMuejolP0zak= X-Received: by 2002:a1f:9d13:0:b0:376:7f81:9b85 with SMTP id g19-20020a1f9d13000000b003767f819b85mr2919065vke.18.1661506315046; Fri, 26 Aug 2022 02:31:55 -0700 (PDT) MIME-Version: 1.0 References: <8D53AD5B-7CFC-4820-9EE4-FEB365D327A8@woofle.net> In-Reply-To: Date: Fri, 26 Aug 2022 11:31:44 +0200 Message-ID: To: =?UTF-8?Q?Micha=C5=82_Marcin_Brzuchalski?= Cc: 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:26, juan carlos morales () escribi=C3=B3: > > 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 By the way you dont need to frame this function to handle 300MB of json-string, as I already mentioned a couple of times, that a 2 MB json-sring validation with json_decode() needs a large amount of memory to be validated, possibly hitting the allowed memory limit, which usually is not that high at all. RFC: https://wiki.php.net/rfc/json_validate Implementation: https://github.com/php/php-src/pull/9399