ExtendedJSONDecoder
public class ExtendedJSONDecoder
ExtendedJSONDecoder facilitates the decoding of ExtendedJSON into Decodable values.
-
Contextual user-provided information for use during decoding.
Declaration
Swift
public var userInfo: [CodingUserInfoKey : Any] -
Initialize an
ExtendedJSONDecoder.Declaration
Swift
public init() -
Decodes an instance of the requested type
Tfrom the provided extended JSON data.Throws
DecodingErrorif the JSON data is corrupt or if any value throws an error during decoding.Declaration
Swift
public func decode<T>(_: T.Type, from data: Data) throws -> T where T : DecodableParameters
typeCodable type to decode the input into.
dataDatawhich represents the JSON that will be decoded.Return Value
Decoded representation of the JSON input as an instance of
T. -
Decodes an instance of the requested type
Tfrom the provided extended JSON data.Throws
DecodingErrorif the JSON data is corrupt or if any value throws an error during decoding.Declaration
Swift
public func decode<T>(_: T.Type, from buffer: ByteBuffer) throws -> T where T : DecodableParameters
typeCodable type to decode the input into.
bufferByteBufferwhich contains the JSON data that will be decoded.Return Value
Decoded representation of the JSON input as an instance of
T.
View on GitHub
Install in Dash
ExtendedJSONDecoder Class Reference