def json(self) -> str:
        """Get the JSON representation of the var.

        Returns:
            The JSON representation of the var.

        Raises:
            TypeError: If the array elements are not of type LiteralVar.
        """
        elements = []
        for element in self._var_value:
            element_var = LiteralVar.create(element)
            if not isinstance(element_var, LiteralVar):
                msg = f"Array elements must be of type LiteralVar, not {type(element_var)}"
                raise TypeError(msg)
            elements.append(element_var.json())

        return "[" + ", ".join(elements) + "]"
Get the JSON representation of the var.

        Returns:
            The JSON representation of the var.

        Raises:
            TypeError: If the array elements are not of type LiteralVar.
        
reflex/vars/sequence.py