Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118334 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 37026 invoked from network); 1 Aug 2022 00:17:34 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 1 Aug 2022 00:17:34 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id F2A93180384 for ; Sun, 31 Jul 2022 19:16:58 -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,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=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (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 ; Sun, 31 Jul 2022 19:16:55 -0700 (PDT) Received: by mail-lf1-f52.google.com with SMTP id t22so15225960lfg.1 for ; Sun, 31 Jul 2022 19:16:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ytFL3TPM26EQd2CAWrCdMEu+SZsDgm555ALWrGGUho4=; b=GzAKoWKXnkcyF9ojRU7xC4rg5fJ0iztWuuQtDxxbOmDrf9ZnX3jpdKjDkTjebwoj39 CVvuvzZ5ttch+IouUjRcsCGRAhpQrZMVLYz0MkynBDtIEqYsa94VJibuk58HWAkYISZ4 9z9ZWqugYu17LD2TmHijtXDoVARZJzoFCV6WhLnE5n1xOaEilnCgL3hl5oVrxUffEafI Z+cItzlrkzVyFfayF7ShLXIW5XOb8/oa2XfST0IOpQZYR6D41Owvz8aFKdXqNUrkSOc2 W/HogbcNygIgoxSYdUm0Aa51TnX+zzXJPIA71ixpLQl583qZCwF70MUgmbApfl85RmmA fSTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ytFL3TPM26EQd2CAWrCdMEu+SZsDgm555ALWrGGUho4=; b=s7Ir4syjQLSS/X9n6GJI7I6+k/DKuct9zXuTJNJji4TSHXdXCxRTHTlf/bZhsMEvX6 QLnZYys+425XBZg7O8JVaBJhfdGC7e5BlCGcNVl6CvrSBh+Qiau1cxQwpKESVkla/MdH F/dDewmhbzP/zj8io/FHm3Y2PsrV8A5aMjZ5WHy8x4k5qHumWuUSFQsZn+k65OwX1Ckw 3mfi4SRInLaTPpxTgGnwZQVIG1fd6U49semxxbgCxLFIHK8fpb3ErlbxM4vTyjlA0LFi fbIJXz6LAIUYiBK/eJMGxT2FFhjGZ5Ler8Q4W0kHXnWUXksWa14ToWduEA7rNBdMfH7r JLOw== X-Gm-Message-State: AJIora/dzUNX2ZnL3xDDI+O9oBWv0rFtWEaFWYFqpbB1LJiX/XNKqtbx FJ29XTRbpkDVSwpAtp8oB/H259le6Jsw4+2hqYdzaCR7 X-Google-Smtp-Source: AGRyM1vNuqunjy88Ah6LmyGapl5Y2hMN8mDNHAnCyJLaH7+ZL56DSq/frDQuFhlUaWgbTYGQyUbtGFvHLMoj54a6J+Q= X-Received: by 2002:a19:4314:0:b0:48a:da65:2a66 with SMTP id q20-20020a194314000000b0048ada652a66mr4234318lfa.257.1659320213708; Sun, 31 Jul 2022 19:16:53 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Sun, 31 Jul 2022 22:16:42 -0400 Message-ID: To: juan carlos morales Cc: Paul Dragoonis , Deleu , David Gebler , Nikita Popov , PHP internals Content-Type: multipart/alternative; boundary="000000000000e8271805e524972a" Subject: Re: [PHP-DEV] RFC Idea - is_json - looking for feedback From: jrbasso@gmail.com (Juan Basso) --000000000000e8271805e524972a Content-Type: text/plain; charset="UTF-8" I think the arguments are good enough for the RFC. However, I would like to propose using a different API. Instead of creating a new global function that could conflict with existing applications, use filter_var validations since it is basically a validation. You can do something like filter_var($possibleJSON, FILTER_VALIDATE_JSON). Over time, if there is a need for extra parameters you can still use the filter_var flags or options (3rd parameter) to indicate if you want just JSON Object, JSON Array, JSON scalar, etc. Juan Basso On Sun, Jul 31, 2022 at 3:46 PM juan carlos morales < dev.juan.morales@gmail.com> wrote: > Hi Juan, > > > > Thanks for your efforts, and examples. > > > > You are solving a common use case, in frameworks, libs, and general > > userland. > > > > This much needed function will see good perf/memory improvements once > > adoption of is_json() hits popular libs and frameworks. > > > > I will be voting in favor of this addition, subject to reviewing the > > implementation and full RFC. > > > > Thanks for the effort. Looking forward to seeing it merged :) > > > > Many thanks, > > Paul Dragoonis > > > > > > > >> > Hello Paul, and sorry, I totally missed your message, thanks for the kind > feedback, you made my day. > > So, if I get it correctly, I have green light to move on with the RFC > process right? so ... I will move on. Once everything is done I will ping > again. > > Regards, > > Juan > > PD: I had to re-send the message as it was too long, ... I am using a > mailing list for the first time ever :) > --000000000000e8271805e524972a--