I'm following the example given in https://cloud.google.com/bigquery/create-simple-app-api#bigquery-simple-app-java to obtain query results from BigQuery API.
TableResult result = queryJob.getQueryResults();
It returns the results in a TableResults type but I need to get the results in a json format.
TableResult{rows=[[FieldValue{attribute=PRIMITIVE, value=(...)},
FieldValue{attribute=PRIMITIVE, value=(...)},
FieldValue{attribute=PRIMITIVE, value=(...)},
FieldValue{attribute=PRIMITIVE, value=(...)},
FieldValue{attribute=PRIMITIVE, value=(...)},
FieldValue{attribute=PRIMITIVE, value=(...)},
FieldValue{attribute=PRIMITIVE, value=(...)}],(...)
How can I transform the results in TableResults type to json, or even csv?