On Sta, 5 July 2025 at 00:04, Jakub Zelenka <bu...@php.net> wrote:

> Hello,
>
> I would like introduce and open discussion for RFC proposing the addition
> of JSON Schema validation support to JSON extension:
>
> https://wiki.php.net/rfc/json_schema_validation
>
> If this is successful, it should be just the first for further
> improvements (see the future scope).
>
> Kind regards,
>
> Jakub
>

Hi, Jakub!

I like the idea. I have a couple of initial thoughts:

1. Wouldn't it make sense to place all the new classes under the `Json`
namespace, similar to how it’s done in `ext-random`?
2. If there’s no way to interact with the `JsonSchema` class, what purpose
does it serve? Wouldn’t it be simpler to just extend `json_decode()` with
an optional `?string $schema = null` parameter?

-- 
Kind regards,
Valentin

Reply via email to