I am working on an App which is capable of opening Wallet passes (.pkpass files). While I can now open most of my testing passes (used/expired boarding passes / tickets / etc. I found in my mails), one specific pass fails to open: My subway card. It is rather old; I have it in the wallet for quite some time now. When I uncompress the .pkpass file (exported from the Wallet), I will get a JSON file which cannot be opened properly. If I do e.g. less pass.json
, this is what I see:
If I open the same file in XCode, this is what I see:
Interestingly, when I open the file using the quick preview in Finder (space), or open file properties in Finder, I will get a valid and clean preview as well. Also, the pass was exported from my iOS wallet, so the file must be valid.
This leads me to believe that this file is using some kind of encoding which cannot be displayed correctly in e.g. less
. I tried opening the file using BBedit
, but no matter which encoding I pick, I will always get garbage.
Can anyone tell me which kind of encoding/file format this is, so I can implement a proper method of opening/parsing this?