code: func ExportToJSON(schema *Schema, outpath string) error {
  	out, file, _, err := outputWriter(outpath, string(schema.Name), ".json")
  	if err != nil {
  		return err
  	}
  	err = WriteJSON(schema, out)
  	if file != nil {
  		file.Close()
  	}
  	return err
  }
docs: // ExportToJSON - v2 schema export to JSON. If out is empty, dump to stdout.