Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119631 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 85176 invoked from network); 1 Mar 2023 11:44:33 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 1 Mar 2023 11:44:33 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id BB5BB18054A for ; Wed, 1 Mar 2023 03:44:32 -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=0.6 required=5.0 tests=BAYES_50,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-vs1-f44.google.com (mail-vs1-f44.google.com [209.85.217.44]) (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 03:44:29 -0800 (PST) Received: by mail-vs1-f44.google.com with SMTP id v27so18796167vsa.7 for ; Wed, 01 Mar 2023 03:44:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677671068; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=FiDIVy3pUxs/iHAuPNDTB0YqBCXNkTlp1IA+yBMk4EU=; b=QJhlAxP3EbjRlMhHXDA2P5eTlMQITDiVizGeKfba0t/QcHfP0GmxbNoAwuYeZVh2mZ 5WZuu2RRgA61yvS2jPp24KOoY3ve6esu51n+UoC/BqUnGFhozLq0sm71XWaOPbscznvc /Gd55jhznC6S7VHNvwDOJcPVBy306MVcx++lu5FRWESYNiGr4QkInJ7U+bvAf9hg/eQH LdW6S7p6BtdMSpRCQBxh3qAQbgIUWrfOzuFLQYMzWaFPGeilF1xkS9uJZgEhzfEZs1BC HHG6Qcdd+6UogGw2URdk332LUBRsiVKKvWPKwXtvl69QdWAQSFMqzInW3Sysi7k3PolV LGQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677671068; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=FiDIVy3pUxs/iHAuPNDTB0YqBCXNkTlp1IA+yBMk4EU=; b=hB9Mc8vtzM2GSFzKFYk0a0nI/gLnC7+J49qiYjZ+jiLx34adshPXrOdM4mToi09wXq D+QwVhbuz0DiB/4LqMhZsM3/mWMD6NCWm1MrKckV8vXcXN84RcwQU3SivLGG5mmYeDRC qcbRgccvKm1ne/l35N6lbhW2TWHMWJf5uZy3rH4Y5Ryr5Yz23fRuSf0rcHpVBF/fggBw EqAMN3BiMB1P5adTzsenDVHcfiFlbmBCJYSWbtxpXZqBvW1dRWZBJZf0mxxJm2HWkN5C 5J4m+ObnoBRP6kibATJU2gwK3M38tNCEp06CpyGaTtL1hiJpf/Odn1s9Qp+A/gg1S19j xb1Q== X-Gm-Message-State: AO0yUKUGFw02Xq/cKUZifc6zz+jm5ogcoZhKeOYPxeDzB3B1WTCYt51R Q+7SyXJ5FZm76LR+P7B/UNw55k15z2alkGzM+fxB0JuXC5w= X-Google-Smtp-Source: AK7set9BcNUiWJuhEPq6NyQ3zE3evnkFU4csKPZ1wXeGX+ovZL13IJexAakPVSGb7FihlcN9/3Dk3HprPd9KJUavSdM= X-Received: by 2002:a05:6102:41a5:b0:420:10e:14e8 with SMTP id cd37-20020a05610241a500b00420010e14e8mr5339927vsb.1.1677671068738; Wed, 01 Mar 2023 03:44:28 -0800 (PST) MIME-Version: 1.0 Date: Wed, 1 Mar 2023 08:44:17 -0300 Message-ID: To: PHP Internals List Content-Type: text/plain; charset="UTF-8" Subject: RFC Idea - json_validate() validate schema From: dev.juan.morales@gmail.com (juan carlos morales) Hello Internals. I am thinking about improving the json_validate() function developed for php 8.3. The actual descriptions goes like this: json_validate(string $json, int $depth = 512, int $flags = 0): bool I am thinking about enhancing this function to also be able to validate against a JSON SCHEMA, giving us something like this: json_validate(string $json, int $depth = 512, int $flags = 0, string $json_schema = null): bool so, if the string is a valid JSON and also respects the schema ... then TRUE. What do you think ? Thanks in advance, your team mate .... Juan