In reply to Denis.

Agreed. I'd like to write configs in PHP. If I have the time and no one beats me to it, I might just write a Composer script to run from the command line, converting theme.php to theme.json.

It'd be neat to have a command to convert PHP, YAML, or even NEON to JSON.

From the PHP end, you could probably use Nette\Schema for validation.