DecodingRepresentation
public protocol DecodingRepresentation
A protocol for encoded data that will only be read.
Please refer to the documentation of Representation for more information about usage.
However, this protocol gives you also more control about the decoding process, because you will have to instantiate a new MetaDecoder, that you may pack with more information, than TranslatingCoder can handle. For example you may provide a userInfo dictionary or an initial codingPath.
-
decode(type:)
Default implementationDecodes a value of the given type from this representation
Default Implementation
Declaration
Swift
func decode<D>(type: D.Type) throws -> D where D : Decodable
-
returns a new MetaDecoder for self
Declaration
Swift
func provideNewDecoder() throws -> MetaDecoder
-
construct a meta tree from this instance that can be used by a decoder returned from provideNewDecoder.
Declaration
Swift
func convert() throws -> Meta