RFC Idea - json_validate() validate schema

From: Date: Wed, 01 Mar 2023 11:44:17 +0000
Subject: RFC Idea - json_validate() validate schema
Groups: php.internals 
Request: Send a blank email to internals+get-119631@lists.php.net to get a copy of this message
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

« previous php.internals (#119631) next »