diff --git a/ibis/expr/datatypes/cast.py b/ibis/expr/datatypes/cast.py index 2eceef7049e2..baabfd00e082 100644 --- a/ibis/expr/datatypes/cast.py +++ b/ibis/expr/datatypes/cast.py @@ -54,6 +54,8 @@ def can_cast_subtype(source: dt.DataType, target: dt.DataType, **kwargs) -> bool @castable.register(dt.Integer, (dt.Floating, dt.Decimal)) @castable.register(dt.Floating, dt.Decimal) @castable.register((dt.Date, dt.Timestamp), (dt.Date, dt.Timestamp)) +@castable.register(dt.String, dt.JSON) +@castable.register(dt.JSON, dt.String) def can_cast_any(source: dt.DataType, target: dt.DataType, **kwargs) -> bool: return True diff --git a/ibis/expr/datatypes/core.py b/ibis/expr/datatypes/core.py index 3dad910e753c..8c0c8c166be3 100644 --- a/ibis/expr/datatypes/core.py +++ b/ibis/expr/datatypes/core.py @@ -773,7 +773,7 @@ def _pretty_piece(self) -> str: @public -class JSON(String): +class JSON(Variadic): """JSON values.""" scalar = ir.JSONScalar