@@ -3,7 +3,7 @@ public enum PassJSON {
33 /// A protocol that defines the structure of a `pass.json` file.
44 ///
55 /// > Tip: See the [`Pass`](https://developer.apple.com/documentation/walletpasses/pass) object to understand the keys.
6- public protocol Properties : Encodable {
6+ public protocol Properties : Codable {
77 /// A short description that iOS accessibility technologies use for a pass.
88 var description : String { get }
99
@@ -34,7 +34,7 @@ extension PassJSON {
3434 /// A protocol that represents the information to display in a field on a pass.
3535 ///
3636 /// > Tip: See the [`PassFieldContent`](https://developer.apple.com/documentation/walletpasses/passfieldcontent) object to understand the keys.
37- public protocol PassFieldContent : Encodable {
37+ public protocol PassFieldContent : Codable {
3838 /// A unique key that identifies a field in the pass; for example, `departure-gate`.
3939 var key : String { get }
4040
@@ -49,7 +49,7 @@ extension PassJSON {
4949 /// A protocol that represents the groups of fields that display the information for a boarding pass.
5050 ///
5151 /// > Tip: See the [`Pass.BoardingPass`](https://developer.apple.com/documentation/walletpasses/pass/boardingpass) object to understand the keys.
52- public protocol BoardingPass : Encodable {
52+ public protocol BoardingPass : Codable {
5353 /// The type of transit for a boarding pass.
5454 ///
5555 /// This key is invalid for other types of passes.
@@ -64,7 +64,7 @@ extension PassJSON {
6464 /// A protocol that represents a barcode on a pass.
6565 ///
6666 /// > Tip: See the [`Pass.Barcodes`](https://developer.apple.com/documentation/walletpasses/pass/barcodes) object to understand the keys.
67- public protocol Barcodes : Encodable {
67+ public protocol Barcodes : Codable {
6868 /// The format of the barcode.
6969 ///
7070 /// The barcode format `PKBarcodeFormatCode128` isn’t supported for watchOS.
@@ -83,7 +83,7 @@ extension PassJSON {
8383 /// A protocol that represents a location that the system uses to show a relevant pass.
8484 ///
8585 /// > Tip: See the [`Pass.Locations`](https://developer.apple.com/documentation/walletpasses/pass/locations) object to understand the keys.
86- public protocol Locations : Encodable {
86+ public protocol Locations : Codable {
8787 /// The latitude, in degrees, of the location.
8888 var latitude : Double { get }
8989
@@ -96,7 +96,7 @@ extension PassJSON {
9696 /// An object that represents the near-field communication (NFC) payload the device passes to an Apple Pay terminal.
9797 ///
9898 /// > Tip: See the [`Pass.NFC`](https://developer.apple.com/documentation/walletpasses/pass/nfc) object to understand the keys.
99- public protocol NFC : Encodable {
99+ public protocol NFC : Codable {
100100 /// The payload the device transmits to the Apple Pay terminal.
101101 ///
102102 /// The size must be no more than 64 bytes.
@@ -112,13 +112,13 @@ extension PassJSON {
112112
113113extension PassJSON {
114114 /// The version of the file format.
115- public enum FormatVersion : Int , Encodable {
115+ public enum FormatVersion : Int , Codable {
116116 /// The value must be `1`.
117117 case v1 = 1
118118 }
119119
120120 /// The type of transit for a boarding pass.
121- public enum TransitType : String , Encodable {
121+ public enum TransitType : String , Codable {
122122 case air = " PKTransitTypeAir "
123123 case boat = " PKTransitTypeBoat "
124124 case bus = " PKTransitTypeBus "
@@ -127,7 +127,7 @@ extension PassJSON {
127127 }
128128
129129 /// The format of the barcode.
130- public enum BarcodeFormat : String , Encodable {
130+ public enum BarcodeFormat : String , Codable {
131131 case pdf417 = " PKBarcodeFormatPDF417 "
132132 case qr = " PKBarcodeFormatQR "
133133 case aztec = " PKBarcodeFormatAztec "
0 commit comments