Skip to content

Commit f5847a0

Browse files
authored
Remove custom encoder code from Decoder (#14)
1 parent 781fef2 commit f5847a0

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

Sources/PureSwiftJSONCoding/Decoding/JSONDecoder.swift

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import PureSwiftJSONParsing
22

33
public struct JSONDecoder {
44

5-
private(set) var customEncoder: [String : CustomEncoder] = [:]
6-
75
@usableFromInline var userInfo: [CodingUserInfoKey : Any] = [:]
86

97
public init() {
@@ -23,14 +21,6 @@ public struct JSONDecoder {
2321
}
2422
}
2523

26-
public typealias CustomEncoder = (Encoder, [CodingKey]) throws -> ()
27-
public mutating func registerCustomEncoder(for type: Encodable.Type, encoder: @escaping CustomEncoder) {
28-
self.customEncoder[String(describing: type)] = encoder
29-
}
30-
31-
public mutating func removeCustomEncoder(for type: Encodable.Type) {
32-
self.customEncoder[String(describing: type)] = nil
33-
}
3424
}
3525

3626
@usableFromInline struct JSONDecoderImpl {

0 commit comments

Comments
 (0)