public function getDecodedJson()
{
if (!$this->cache->has(__METHOD__)) {
$templateBody = $this->getProcessedTemplate();
$array = json_decode($templateBody, true);
if (!is_array($array)) {
throw new TemplateDecodeException($this->getFilePath(), sprintf("Error decoding file '%s'", $this->getFilePath()));
}
if ($array['AWSTemplateFormatVersion'] != '2010-09-09') {
throw new TemplateInvalidException($this->getFilePath(), 'Invalid AWSTemplateFormatVersion');
}
$this->cache->set(__METHOD__, $array);
}
return $this->cache->get(__METHOD__);
}