Skip to content

Commit d40a5a0

Browse files
authored
Merge pull request #3 from nimblehq/feature/decoder-init
Implement init for JSONAPIDecoder
2 parents f9ea2d9 + c18cbd9 commit d40a5a0

File tree

3 files changed

+3
-23
lines changed

3 files changed

+3
-23
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Once you have your Swift package set up, adding Alamofire as a dependency is as
1212

1313
```swift
1414
dependencies: [
15-
.package(url: "https://github.com/nimblehq/JSONMapper.git", .upToNextMajor(from: "1.0.0"))
15+
.package(url: "https://github.com/nimblehq/JSONMapper.git", .upToNextMajor(from: "1.0.1"))
1616
]
1717
```
1818

Sources/JSONMapper/Extensions/Encodable+Dictionary.swift

Lines changed: 0 additions & 21 deletions
This file was deleted.

Sources/JSONMapper/JSONAPIDecoder.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ public class JSONAPIDecoder: JSONDecoder {
1212

1313
private let decoder: JSONEncoder
1414

15-
init(decoder: JSONEncoder = JSONEncoder()) {
15+
public init(decoder: JSONEncoder = JSONEncoder()) {
1616
self.decoder = decoder
17+
super.init()
1718
}
1819

1920
public override func decode<T>(_ type: T.Type, from data: Data) throws -> T where T: Decodable {

0 commit comments

Comments
 (0)