public static function json_decode($json, $assoc = false)
{
return json_decode($json, $assoc);
}
private function loadJsonMetadata($path) { if (!file_exists($path)) { return array(); } $json = file_get_contents($path); if (!$json) { return array(); } $info = Common::json_decode($json, $assoc = true); if (!is_array($info) || empty($info)) { throw new Exception("Invalid JSON file: {$path}"); } return $info; }