json_validate()
function json_validate(string $json, int $depth = 512, int $flags = 0): bool
Checks if a string contains valid JSON.
Parameters:
$json(string)$depth(int), default512, optional$flags(int), default0, optional
Returns: bool
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how json_validate is implemented in the compiler, see the internals page.