@@ -29,8 +29,8 @@ Encode/Decode:
2929- Supports builtin and custom ` type-conversion ` .
3030
3131Simple and flexible Encodable/Decodable API:
32- - ** Part of the API draws on the design of an awesome framework - [ Codextended] ( https://github.com/JohnSundell/Codextended ) .**
33- - Uses JSON Encoder/Decoder by default.
32+ - ** Part of the API borrows from an awesome framework - [ Codextended] ( https://github.com/JohnSundell/Codextended ) .**
33+ - Uses JSON Encoder/Decoder by default, and supports PList .
3434- Uses ` type-inference ` .
3535- Returns ` Optional ` values instead of throwing errors.
3636
@@ -56,10 +56,10 @@ extension TestStruct: ExCodable {
5656 ]
5757
5858 init (from decoder : Decoder) throws {
59- Self .keyMapping . decode ( & self , using : decoder)
59+ decode ( with : Self .keyMapping , using : decoder)
6060 }
6161 func encode (to encoder : Encoder) throws {
62- Self .keyMapping . encode ( self , using : encoder)
62+ encode ( with : Self .keyMapping , using : encoder)
6363 }
6464
6565}
@@ -85,10 +85,10 @@ class TestClass: ExCodable, Equatable {
8585 ]
8686
8787 required init (from decoder : Decoder) throws {
88- Self .keyMapping . decode ( self , using : decoder)
88+ decodeReference ( with : Self .keyMapping , using : decoder)
8989 }
9090 func encode (to encoder : Encoder) throws {
91- Self .keyMapping . encode ( self , using : encoder)
91+ encode ( with : Self .keyMapping , using : encoder)
9292 }
9393
9494 static func == (lhs : TestClass, rhs : TestClass) -> Bool {
@@ -115,11 +115,11 @@ class TestSubclass: TestClass {
115115
116116 required init (from decoder : Decoder) throws {
117117 try super .init (from : decoder)
118- Self .keyMappingForTestSubclass . decode ( self , using : decoder)
118+ decodeReference ( with : Self .keyMappingForTestSubclass , using : decoder)
119119 }
120120 override func encode (to encoder : Encoder) throws {
121121 try super .encode (to : encoder)
122- Self .keyMappingForTestSubclass . encode ( self , using : encoder)
122+ encode ( with : Self .keyMappingForTestSubclass , using : encoder)
123123 }
124124
125125 static func == (lhs : TestSubclass, rhs : TestSubclass) -> Bool {
@@ -250,13 +250,13 @@ else {
250250[ Swift Package Manager] ( https://github.com/apple/swift-package-manager ) :
251251
252252``` swift
253- .package (url : " https://github.com/iwill/ExCodable" , from : " 0.1 " )
253+ .package (url : " https://github.com/iwill/ExCodable" , from : " 0.2 " )
254254```
255255
256256[ CocoaPods] ( http://cocoapods.org ) :
257257
258258``` ruby
259- pod ' ExCodable' , ' ~> 0.1 '
259+ pod ' ExCodable' , ' ~> 0.2 '
260260```
261261
262262## Credits
0 commit comments