jsonUTF8Data(from:options:)

    Returns a Data containing the UTF-8 JSON serialization of the messages.

    Message+JSONArrayAdditions_Data.swift:65
    static func jsonUTF8Data<C>(from collection: C, options: JSONEncodingOptions = JSONEncodingOptions()) throws -> Data where Self == C.Element, C : Collection

    Parameters

    collection

    The list of messages to encode.

    options

    The JSONEncodingOptions to use.

    Returns

    A Data containing the JSON serialization of the messages.

    Throws

    JSONEncodingError if encoding fails.

    Unlike binary encoding, presence of required fields is not enforced when serializing to JSON.

    Other members in extension

    Type members

    Show obsolete interfaces (3)

    Hide obsolete interfaces

    Instance members

    Show obsolete interfaces (2)

    Hide obsolete interfaces