Is it possible to return the query results from Spanner to a JSON document? For example, if the query is to "read all transactions for this account", and return those row / record results into a single JSON strong or document, is this possible ? If so, what is the size limitation? ie how many transaction rows can this hold ? example - of there wee 400 transactions in a table, could those all go into a JSON doc or string?
As Hailong comments, the link you shared retrieved data stored in Json formatted string. Cloud Spanner does not provide a native way to perform this task. If you want to do it, you need to implement it in your code. For example, you can take a look at this other question as a reference. But it will be depend of the language you want to use.
On the other hand, using a gcloud command you can perform it using gcloud spanner databases execute-sql
and using the --format flag to select the json format as --format=json
You can take a look at here and here for more information about it.