Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119637 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 97912 invoked from network); 1 Mar 2023 13:36:44 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 1 Mar 2023 13:36:44 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 437581804D7 for ; Wed, 1 Mar 2023 05:36:44 -0800 (PST) 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,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-yw1-f182.google.com (mail-yw1-f182.google.com [209.85.128.182]) (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 ; Wed, 1 Mar 2023 05:36:40 -0800 (PST) Received: by mail-yw1-f182.google.com with SMTP id 00721157ae682-536b7ffdd34so363922197b3.6 for ; Wed, 01 Mar 2023 05:36:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=bqJ55OWWll8O/adqH5ptWE9M2imQ6frU01ifT854vzE=; b=TGETEmFVR4PWN1dI7N4XplGpR3vD6spW7UGcOXyc5MWlo8+RWHIizk5Ea/vwUuKZ2/ H9LQfpLTAuPmJVUz1PZWXwhWfTFWgAiTssxRaq1l51rK34snDV1gPqyaxQXYTrTcduPd +jKC2Apob/UxS6KslWtc1LVjn4Sih2sem+pJRoSEK8daGjA3xtpf1P08+X+eik/evHpO CHll2YsKhr1wy6wxJwZjb5RDTk/S0/K+8CH8U1JGFtdNDDutu73Qa7IAUOKBO1N4oSs3 cep6LCfhIdso1h6zelDdL8x6RlNeXjF2f52kbrsleTOSSQ/q7NOa6edck1t+uDjYcF80 hyyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=bqJ55OWWll8O/adqH5ptWE9M2imQ6frU01ifT854vzE=; b=2cQ+bwbfdZLgYke2NeWlZgUuymagXuoGola8fd+7v5+dznuOc9g1DNeO2yJGuiKsJM s6LF8cqivdxS2qSd6tTgXs1hwIXybBV4S873Y3IWykmr3H8/gZqq2cqTrJxiCVsnXCDx fJXLeZhFqlmEW7HyHTnXXEWQnFOYgj313jvF8H8miYgHqULr+OmUb+cTd7BTucGOP5pB +hjD5vPOMkbtgm8wi9RG2MSfPjSucZEzS5yhYMkdwtW6jM1ItItNX9/NHOUnh6wkVmEM R48NuDjJJAwhWKXaHyCY5BOlIfz2O9JiRFHtK9p03oF+98IzrvWYqzzVaRmSHf3ZznZr zknQ== X-Gm-Message-State: AO0yUKXCSHkg6W8V/+WyREjbbPHH1YErm4lF3DClMzNpcBiXcOUWFe19 saE/f38y3NFDIhUGbXhBZqxecESsBxUs+azs1+c= X-Google-Smtp-Source: AK7set/Q7VKWqu1MNH/tIdpq+7XD1zKUtBVUrPNHrsERXCS9GR0REkoV6Dcw2LEm8Fzt8GF4RtyXVDUpF08T8xuZwio= X-Received: by 2002:a81:a745:0:b0:536:3c2c:bf5e with SMTP id e66-20020a81a745000000b005363c2cbf5emr3897705ywh.8.1677677800152; Wed, 01 Mar 2023 05:36:40 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 1 Mar 2023 14:36:29 +0100 Message-ID: To: Jakub Zelenka Cc: juan carlos morales , PHP Internals List Content-Type: multipart/alternative; boundary="00000000000053655805f5d6cd32" Subject: Re: [PHP-DEV] RFC Idea - json_validate() validate schema From: michal.brzuchalski@gmail.com (=?UTF-8?Q?Micha=C5=82_Marcin_Brzuchalski?=) --00000000000053655805f5d6cd32 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Jakub =C5=9Br., 1 mar 2023, 14:09 u=C5=BCytkownik Jakub Zelenka n= apisa=C5=82: > > > > Question ... are you planning to incorporate this by enhancing > > json_validate() ??? > > > > Yes the plan is to initially enhance json_decode and json_validate that > would get a new $schema argument . I plan to create a class for the > actually schema as it needs to be parsed to its own representation so it = is > convenient to have it in the object. It could be also later created from > the different sources than just JSON string (e.g. assoc array / stdClass = or > automatic generation from the class that I mentioned before) so it will b= e > better to have it in the class. > > Regards > > Jakub > Do we really need this in core? What makes it less usable as an extension? Cheers, Micha=C5=82 Marcin Brzuchalski > --00000000000053655805f5d6cd32--