DictionaryCoder
public struct DictionaryCoder<Properties, Key, Value> : CustomCoder where Properties : DictionaryCoderProperties, Key : Hashable
extension DictionaryCoder: CustomDecoder where Key: Decodable, Value: Decodable
extension DictionaryCoder: CustomEncoder where Key: Encodable, Value: Encodable
Coder for encoding/decoding Dictionaries. This is extended to support encoding and decoding based on whether Key
and Value
are Encodable
or Decodable
.
-
Declaration
Swift
public typealias CodableValue = [Key : Value]
-
Declaration
Swift
public static func decode(from decoder: Decoder) throws -> CodableValue
-
Declaration
Swift
public static func encode(value: CodableValue, to encoder: Encoder) throws