{"id":13431717,"url":"https://github.com/TinyCsvParser/TinyCsvParser","last_synced_at":"2025-03-16T12:31:18.909Z","repository":{"id":39581452,"uuid":"42392775","full_name":"TinyCsvParser/TinyCsvParser","owner":"TinyCsvParser","description":"Easy to use, easy to extend and high-performance library for CSV parsing with .NET","archived":false,"fork":false,"pushed_at":"2024-02-22T16:44:26.000Z","size":11551,"stargazers_count":369,"open_issues_count":6,"forks_count":76,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-04-13T18:41:38.308Z","etag":null,"topics":["csv-parser"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TinyCsvParser.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2015-09-13T11:04:14.000Z","updated_at":"2024-04-26T00:41:26.663Z","dependencies_parsed_at":"2024-04-26T00:41:23.696Z","dependency_job_id":"18885863-2095-463b-a874-7f2fc41ab5fb","html_url":"https://github.com/TinyCsvParser/TinyCsvParser","commit_stats":{"total_commits":229,"total_committers":13,"mean_commits":"17.615384615384617","dds":0.2838427947598253,"last_synced_commit":"79cf6a4c889965513546b2f6f1ffa63a7123e8e4"},"previous_names":["bytefish/tinycsvparser"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TinyCsvParser%2FTinyCsvParser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TinyCsvParser%2FTinyCsvParser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TinyCsvParser%2FTinyCsvParser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TinyCsvParser%2FTinyCsvParser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TinyCsvParser","download_url":"https://codeload.github.com/TinyCsvParser/TinyCsvParser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243869178,"owners_count":20360967,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csv-parser"],"created_at":"2024-07-31T02:01:05.318Z","updated_at":"2025-03-16T12:31:17.802Z","avatar_url":"https://github.com/TinyCsvParser.png","language":"C#","funding_links":[],"categories":["Frameworks, Libraries and Tools","others"],"sub_categories":["Serialization"],"readme":"# TinyCsvParser #\n\n[TinyCsvParser]: https://github.com/TinyCsvParser/TinyCsvParser\n[MIT License]: https://opensource.org/licenses/MIT\n\n[TinyCsvParser] is a .NET library to parse CSV data in an easy and *fun way*, while offering very high performance and a very clean API. It is highly configurable to provide maximum flexibility.\n\nTo get started quickly, follow the [Quickstart](https://tinycsvparser.github.io/TinyCsvParser/sections/quickstart.html).\n\n[TinyCsvParser] supports .NET Core.\n\n## Installing TinyCsvParser ##\n\nYou can use [NuGet](https://www.nuget.org) to install [TinyCsvParser]. Run the following command\nin the [Package Manager Console](http://docs.nuget.org/consume/package-manager-console).\n\n```powershell\nPM\u003e Install-Package TinyCsvParser\n```\n\n## Community Packages ##\n\n[@Miista]: https://github.com/Miista\n\n[@Miista] provides several community packages to simplify working with TinyCsvParser:\n\n* [TinyCsvParser.Optional](https://github.com/Miista/TinyCsvParser.Optional)\n* [TinyCsvParser.Collections](https://github.com/Miista/TinyCsvParser.Collections)\n* [TinyCsvParser.ImmutableCollections](https://github.com/Miista/TinyCsvParser.ImmutableCollections)\n* [TinyCsvParser.Enums](\u003chttps://github.com/Miista/TinyCsvParser.Enums\u003e)\n\n## Documentation and Changelog ##\n\n[TinyCsvParser] comes with an official documentation and changelog:\n\n* [https://tinycsvparser.github.io/TinyCsvParser/](https://tinycsvparser.github.io/TinyCsvParser/)\n\n## Basic Usage ##\n\nThis is only an example for the most common use of TinyCsvParser. For more detailed information on custom formats and more advanced use-cases,\nplease consult the full [User Guide](https://tinycsvparser.github.io/TinyCsvParser/sections/userguide.html) of the official documentation.\n\nImagine we have list of Persons in a CSV file ``persons.csv`` with their first name, last name and birthdate.\n\n```csv\nFirstName;LastName;BirthDate\nPhilipp;Wagner;1986/05/12\nMax;Musterman;2014/01/02\n```\n\nThe corresponding domain model in our system might look like this.\n\n```csharp\nprivate class Person\n{\n    public string FirstName { get; set; }\n    \n    public string LastName { get; set; }\n    \n    public DateTime BirthDate { get; set; }\n}\n```\n\nWhen using [TinyCsvParser] you have to define the mapping between the columns in the CSV data and the property in you domain model.\n\n```csharp\nprivate class CsvPersonMapping : CsvMapping\u003cPerson\u003e\n{\n    public CsvPersonMapping()\n        : base()\n    {\n        MapProperty(0, x =\u003e x.FirstName);\n        MapProperty(1, x =\u003e x.LastName);\n        MapProperty(2, x =\u003e x.BirthDate);\n    }\n}\n```\n\nAnd then we can use the mapping to parse the CSV data with a ``CsvParser``.\n\n```csharp\nnamespace TinyCsvParser.Test\n{\n    [TestFixture]\n    public class TinyCsvParserTest\n    {\n        [Test]\n        public void TinyCsvTest()\n        {\n            CsvParserOptions csvParserOptions = new CsvParserOptions(true, ';');\n            CsvPersonMapping csvMapper = new CsvPersonMapping();\n            CsvParser\u003cPerson\u003e csvParser = new CsvParser\u003cPerson\u003e(csvParserOptions, csvMapper);\n\n            var result = csvParser\n                .ReadFromFile(@\"persons.csv\", Encoding.ASCII)\n                .ToList();\n\n            Assert.AreEqual(2, result.Count);\n\n            Assert.IsTrue(result.All(x =\u003e x.IsValid));\n   \n            Assert.AreEqual(\"Philipp\", result[0].Result.FirstName);\n            Assert.AreEqual(\"Wagner\", result[0].Result.LastName);\n\n            Assert.AreEqual(1986, result[0].Result.BirthDate.Year);\n            Assert.AreEqual(5, result[0].Result.BirthDate.Month);\n            Assert.AreEqual(12, result[0].Result.BirthDate.Day);\n\n            Assert.AreEqual(\"Max\", result[1].Result.FirstName);\n            Assert.AreEqual(\"Mustermann\", result[1].Result.LastName);\n\n            Assert.AreEqual(2014, result[1].Result.BirthDate.Year);\n            Assert.AreEqual(1, result[1].Result.BirthDate.Month);\n            Assert.AreEqual(1, result[1].Result.BirthDate.Day);\n        }\n    }\n}\n```\n\n## License ##\n\nThe library is released under terms of the [MIT License]:\n\n* [https://github.com/TinyCsvParser/TinyCsvParser](https://github.com/TinyCsvParser/TinyCsvParser)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTinyCsvParser%2FTinyCsvParser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTinyCsvParser%2FTinyCsvParser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTinyCsvParser%2FTinyCsvParser/lists"}