title: Convert Outlook PST to json using libpst
body: <p>I have an Outlook PST file, and I'd like to get a json of the emails, e.g. something like</p>
  
  <pre><code>{"emails": [
  {"from": "alice@example.com",
   "to": "bob@example.com",
   "bcc": "eve@example.com",
   "subject": "mitm",
   "content": "be careful!"
  }, ...]}
  </code></pre>
  
  <p>I've thought using <code>readpst</code> to convert to MH format and then scan it in a ruby/python/bash script, is there a better way?</p>
  
  <p>Unfortunately the <code>ruby-msg</code> gem doesn't work on my PST files (and looks like it wasn't updated since 2014).</p>