Skip to content
Snippets Groups Projects

Remove problematic bigint encoding

Merged Dariusz Rybicki requested to merge fix/bigint-encoding into development
2 files
+ 0
46
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 0
23
import Foundation
public struct DHKey: Equatable {
public init(value: String, fingerprint: UInt64) {
self.value = value
self.fingerprint = fingerprint
}
public var value: String
public var fingerprint: UInt64
}
extension DHKey: Decodable {
enum CodingKeys: String, CodingKey {
case value = "Value"
case fingerprint = "Fingerprint"
}
public static func decode(_ data: Data) throws -> Self {
let data = convertJsonNumberToString(in: data, at: "Value")
return try JSONDecoder().decode(Self.self, from: data)
}
}
Loading