CSVSyncEncoder
public final class CSVSyncEncoder
The encoder for encoding multiple objects at once into a single CSV document.
You can get an instance of the CSVSyncEncoder
with the CSVEncoder.sync
property.
-
Encodes an array of encodable objects into a single CSV document.
Throws
Encoding errors that occur when encoding the given objects.
Declaration
Swift
public func encode<T>(_ objects: [T])throws -> Data where T: Encodable
Parameters
objects
The objects to encode to CSV rows.
Return Value
The data for the CSV document.