JSONParsePipeline
public class JSONParsePipeline : ResponsePipelineTerminator
Represents a terminator pipeline with a JSON decoder to parse data.
-
An underlying JSON parser of the pipeline.
Declaration
Swift
public let parser: JSONDecoder -
Initializes a
JSONParsePipelineobject.Declaration
Swift
public init(_ parser: JSONDecoder)Parameters
parserThe JSON parser for input data.
-
Parses
datathat holds input values to aResponseobject.Throws
An error that occurs during the parsing process.Declaration
Swift
public func parse<T>(request: T, data: Data) throws -> T.Response where T : RequestParameters
requestThe original request.
dataThe
Dataobject received from aSessionobject.Return Value
The
Responseobject.
View on GitHub
JSONParsePipeline Class Reference