···11+import Foundation
22+33+public struct GetRecordOutput: Decodable, Sendable {
44+ public let uri: String
55+ public let cid: String?
66+ /// Pretty-printed, sorted-keys JSON bytes of the record value.
77+ public let value: Data
88+99+ enum CodingKeys: String, CodingKey { case uri, cid, value }
1010+1111+ public init(from decoder: Decoder) throws {
1212+ let c = try decoder.container(keyedBy: CodingKeys.self)
1313+ uri = try c.decode(String.self, forKey: .uri)
1414+ cid = try c.decodeIfPresent(String.self, forKey: .cid)
1515+ let any = try c.decode(AnyDecodable.self, forKey: .value)
1616+ value = try JSONSerialization.data(
1717+ withJSONObject: any.value,
1818+ options: [.prettyPrinted, .sortedKeys]
1919+ )
2020+ }
2121+}