public function decode(string $json): array
    {
        $decoded = \json_decode($json, true);
        if (\json_last_error() !== JSON_ERROR_NONE) {
            throw new DecodingException(\json_last_error_msg(), \json_last_error());
        }
        return $decoded;
    }