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 JSONParsePipeline object.

    Declaration

    Swift

    public init(_ parser: JSONDecoder)

    Parameters

    parser

    The JSON parser for input data.

  • Parses data that holds input values to a Response object.

    Throws

    An error that occurs during the parsing process.

    Declaration

    Swift

    public func parse<T>(request: T, data: Data) throws -> T.Response where T : Request

    Parameters

    request

    The original request.

    data

    The Data object received from a Session object.

    Return Value

    The Response object.