Skip to content

Create static configuration objects with the relevant structure for popular CSV importers #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
scottmatthewman opened this issue Jan 3, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@scottmatthewman
Copy link
Owner

Different applications that are capable of importing CSV files have different ways of handling some data types. Indeed, that it why CSVEncoderConfiguration exists.

But each app generally wants the same format all the time, and developers shouldn’t need to have to remember (or investigate) which date formats are needed for the most popular apps.

We could provide static instances of CSVEncoderConfiguration that have the necessary encoding strategies predefined, for example:

CSVEncoderConfiguration.excel // All the necessary config to ensure CSV files are readable by Microsoft Excel
CSVEncoderConfiguration.numbers // All the necessary config to ensure CSV files are readable by Apple Numbers

This would make the definitions more expressive while hiding the implementation detail:

let table = CSVTable<Person>(columns: [  ], configuration: .excel)
@scottmatthewman scottmatthewman added the enhancement New feature or request label Jan 3, 2024
@scottmatthewman scottmatthewman changed the title Suggestion: Create static configuration objects with the relevant structure for popular CSV users Create static configuration objects with the relevant structure for popular CSV importers Jan 3, 2024
@scottmatthewman scottmatthewman added the good first issue Good for newcomers label Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant