Print JSON output.
(&self, info: &atomic_remote::IdentityInfo, canonical: &str, expected_did: &str)
| 186 | |
| 187 | /// Print JSON output. |
| 188 | fn output_json(&self, info: &atomic_remote::IdentityInfo, canonical: &str, expected_did: &str) { |
| 189 | let obj = serde_json::json!({ |
| 190 | "name": info.name, |
| 191 | "identity_id": info.id, |
| 192 | "public_key": canonical, |
| 193 | "status": info.status, |
| 194 | "created_at": info.created_at.to_rfc3339(), |
| 195 | "did_atomic": expected_did, |
| 196 | "server_public_key": info.public_key, |
| 197 | }); |
| 198 | println!("{}", serde_json::to_string_pretty(&obj).unwrap()); |
| 199 | } |
| 200 | } |
| 201 | |
| 202 | /// Compute the `did:atomic:` identifier for a canonical base32 public key. |