protected function isJsonCastable($key) { return $this->hasCast($key) && in_array($this->getCastType($key), ['array', 'json', 'object'], true); }