Casting sql value to json

Viewed 47

Why doesn't the CAST expression work to JSON? For example:

SELECT TO_JSON(true), CAST(true AS JSON)

It seems only the specialize TO_JSON function works for a cast to json. Is this the expected behavior? Why doesn't BigQuery allow to cast to json like all other types that it supports (minus GEO I suppose with always uses the ST_)?

0 Answers
Related