# CodableCSV **Repository Path**: curryluya-github/CodableCSV ## Basic Information - **Project Name**: CodableCSV - **Description**: 44354354353453 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-09-24 - **Last Updated**: 2023-09-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README

Codable CSV

Swift 5.x macOS 10.10+ - iOS 8+ - tvOS 9+ - watchOS 2+ Ubuntu 18.04 MIT License

[CodableCSV](https://github.com/dehesa/CodableCSV) provides: - Imperative CSV reader/writer. - Declarative CSV encoder/decoder. - Support multiple inputs/outputs: `String`s, `Data` blobs, `URL`s, and `Stream`s (commonly used for `stdin`). - Support numerous string encodings and [Byte Order Markers](https://en.wikipedia.org/wiki/Byte_order_mark) (BOM). - Extensive configuration: delimiters, escaping scalar, trim strategy, codable strategies, presampling, etc. - [RFC4180](https://tools.ietf.org/html/rfc4180) compliant with default configuration and CRLF (`\r\n`) row delimiter. - Multiplatform support with no dependencies (the Swift Standard Library and Foundation are implicit dependencies). # Usage To use this library, you need to: There are two ways to use this library: 1. imperatively, as a row-by-row and field-by-field reader/writer. 2. declaratively, through Swift's `Codable` interface. ## Imperative Reader/Writer The following types provide imperative control on how to read/write CSV data. ## Declarative Decoder/Encoder The encoders/decoders provided by this library let you use Swift's `Codable` declarative approach to encode/decode CSV data. ### Tips using `Codable` `Codable` is fairly easy to use and most Swift standard library types already conform to it. However, sometimes it is tricky to get custom types to comply to `Codable` for specific functionality. # Roadmap

Roadmap

The library has been heavily documented and any contribution is welcome. Check the small [How to contribute](docs/CONTRIBUTING.md) document or take a look at the [Github projects](https://github.com/dehesa/CodableCSV/projects) for a more in-depth roadmap. ### Community If `CodableCSV` is not of your liking, the Swift community offers other CSV solutions: - [CSV.swift](https://github.com/yaslab/CSV.swift) contains an imperative CSV reader/writer and a _lazy_ row decoder and adheres to the [RFC4180](https://tools.ietf.org/html/rfc4180) standard. - [SwiftCSV](https://github.com/swiftcsv/SwiftCSV) is a well-tested parse-only library which loads the whole CSV in memory (not intended for large files). - [CSwiftV](https://github.com/Daniel1of1/CSwiftV) is a parse-only library which loads the CSV in memory and parses it in a single go (no imperative reading). - [CSVImporter](https://github.com/Flinesoft/CSVImporter) is an asynchronous parse-only library with support for big CSV files (incremental loading). - [SwiftCSVExport](https://github.com/vigneshuvi/SwiftCSVExport) reads/writes CSV imperatively with Objective-C support. - [swift-csv](https://github.com/brutella/swift-csv) offers an imperative CSV reader/writer based on Foundation's streams. There are many good tools outside the Swift community. Since writing them all would be a hard task, I will just point you to the great [AwesomeCSV](https://github.com/secretGeek/awesomeCSV) github repo. There are a lot of treasures to be found there.