Skip to content

Commit

Permalink
dump_shc.js: ensure full contents of SMART health card are displayed
Browse files Browse the repository at this point in the history
Node.js "helpfully" tries to reduce the amount of output when we pass
the decoded object to console.log(), so we need to pretty-print it
ourselves before displaying.  Fixes #2.
  • Loading branch information
steven676 committed Jul 19, 2021
1 parent 6316263 commit c06ed1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dump_shc.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ verifyJWS(scannedJWS, header.kid).then(
function (result) {
return decodeJWSPayload(result.payload).then(
(decoded) => {
console.log(decoded.vc.credentialSubject.fhirBundle.entry);
console.log(JSON.stringify(decoded.vc.credentialSubject.fhirBundle.entry, null, 2));
},
(e) => {
console.log("Ooooh crap - this looks like a fake vaccination proof");
Expand Down

0 comments on commit c06ed1b

Please sign in to comment.