title: How to serialize and object that can't be serialized?
body: <p>I know this is a common question, but I need to serialize an object that is saying it can't be serialized. I am using the external library pyarrow, and I specifically am working with ParquetDatasets and schemas of those. I can print the schema and it comes out like this:</p>
  
  <pre><code>stage_dataset: &lt;pyarrow.parquet.ParquetDataset object at 0x7f8ddcc088d0&gt;
  stage_dataset_schema: &lt;pyarrow._parquet.ParquetSchema object at 0x7f8ddc287dd0&gt;
  machine_id: BYTE_ARRAY String
  wkstn_grp: BYTE_ARRAY String
  charge_unit: BYTE_ARRAY String
  workstation: BYTE_ARRAY String
  wstndesc: BYTE_ARRAY String
  current_part_no: BYTE_ARRAY String
  current_oper_no: BYTE_ARRAY String
  laborclass: BYTE_ARRAY String
  jobclass: BYTE_ARRAY String
  dml_operation: BYTE_ARRAY String
  </code></pre>
  
  <p>I need all those columns and datatypes into a JSON or dictionary or something. I don't have option of modifying the class to make it serializable as that tech debt I don't want to create. Is there a different class or method I should be using in pyarrow that would allow JSON output?</p>
  
  <p>Thanks for any help.</p>