Skip to content

Commit

Permalink
The encoding and decoding of a Rule is not consistent, i.e. not all f…
Browse files Browse the repository at this point in the history
…ields are encoded, e.g.: (eu-digital-green-certificates#14)

logic is decoded but not encoded in encode
countryCode is decoded not encoded in encode
affectedString is encoded twice

Co-authored-by: Alexandr Chernyy <[email protected]>
  • Loading branch information
alexchornyi and pingus-nikalex authored Jun 30, 2021
1 parent b1bba4f commit c8a2ea2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/CertLogic/Rule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ public class Rule: Codable {
try container.encode(validFrom, forKey: .validFrom)
try container.encode(validTo, forKey: .validTo)
try container.encode(affectedString, forKey: .affectedString)
try container.encode(affectedString, forKey: .affectedString)
try container.encode(logic, forKey: .logic)
try container.encode(countryCode, forKey: .countryCode)
}

}
Expand Down

0 comments on commit c8a2ea2

Please sign in to comment.