public function loadJson($path)
{
if (!file_exists($path)) {
throw new FileNotFoundException('File not found: ' . $path);
}
$decoded = json_decode(file_get_contents($path), true);
if ($decoded === null) {
throw new MisconfigurationException('Unable to decode JSON for ' . $path);
}
return $decoded;
}