*/ protected function decodeJsonArray(?string $json): array { if ($json === null || $json === '') { return []; } $decoded = json_decode($json, true); return is_array($decoded) ? $decoded : []; } }