I've received some feedback asking how to take a schema from the client library and save it to a JSON file. One reason to do this is the bq command-line tool accepts a schema file, formatted like
[
{"name": "name", "type": "string", "mode": "required"},
{"name": "gender", "type": "string", "mode": "nullable"},
{"name": "count", "type": "integer", "mode": "required"}
]
Note: this format is the same as the API representation.
It would be great if our client libraries could read/write in this format.