SingleValueCollector

open class SingleValueCollector : FieldCollector<String>, @unchecked Sendable

A class representing a single value collector, Inheriting from FieldCollector and conforming to Collector.

  • The single value to collect.

    Declaration

    Swift

    public var value: String
  • Initializes the single value collector with the given input.

    Declaration

    Swift

    public required init(with json: [String : Any])

    Parameters

    json

    A dictionary representing the JSON element to parse.

  • Initializes the SingleValueCollector with the given value.

    Declaration

    Swift

    public override func initialize(with value: Any)

    Parameters

    value

    The value to initialize the collector with.

  • Declaration

    Swift

    public override func payload() -> String?