title: pkpass: Unknown encoding of JSON format (iOS Wallet pass file)
body: <p>I am trying to open a <code>.pkpass</code> file  (or merely the contained <code>pass.json</code> file) in an app I am developing, however, while I didn't have issues with 3 passes I tried, the 4th seems to have some kind of weird encoding and/or binary data within the JSON.</p>
  <p>When I open the JSON file using e.g. <code>less</code> in the shell, I'll get this:</p>
  <p><a href="https://i.stack.imgur.com/8IWhL.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8IWhL.jpg" alt="enter image description here" /></a></p>
  <p>And while we can see mostly garbage, there is readable characters mixed into it. When I open it using XCode, this is what I get:</p>
  <p><a href="https://i.stack.imgur.com/yX6ZC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yX6ZC.png" alt="enter image description here" /></a></p>
  <p>This leads me to believe its a character encoding issue. But I am not too good in text encoding, so I don't know how I can find out the correct encoding in order to be able to properly read this file with my app. <code>file</code> is giving me:</p>
  <pre><code>$ file -I pass.json 
  pass.json: application/octet-stream; charset=binary
  </code></pre>
  <p>I tried opening the file with <code>BBedit</code> over and over again with different encodings, none would open it in a readable format.</p>
  <p>What kind of format is this, or how can I find out, so I can implement the correct method of opening/parsing this file?</p>