{"id":37059621,"url":"https://github.com/ninjacoder88/ninja-csv","last_synced_at":"2026-01-14T06:44:01.756Z","repository":{"id":56405094,"uuid":"252593962","full_name":"ninjacoder88/ninja-csv","owner":"ninjacoder88","description":"CSV function","archived":false,"fork":false,"pushed_at":"2023-11-26T20:26:26.000Z","size":177,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-29T20:17:09.681Z","etag":null,"topics":["csv"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ninjacoder88.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}},"created_at":"2020-04-03T00:20:20.000Z","updated_at":"2023-08-04T04:03:41.000Z","dependencies_parsed_at":"2023-11-26T21:27:27.372Z","dependency_job_id":null,"html_url":"https://github.com/ninjacoder88/ninja-csv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ninjacoder88/ninja-csv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninjacoder88%2Fninja-csv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninjacoder88%2Fninja-csv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninjacoder88%2Fninja-csv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninjacoder88%2Fninja-csv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ninjacoder88","download_url":"https://codeload.github.com/ninjacoder88/ninja-csv/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninjacoder88%2Fninja-csv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28412224,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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"],"created_at":"2026-01-14T06:44:00.668Z","updated_at":"2026-01-14T06:44:01.740Z","avatar_url":"https://github.com/ninjacoder88.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\nNinjaCsv is a library which allows parsing CSV (or a delimiter of your choice) files into a object. The project is built in .NET Standard 2.0.\n\n# Contribute\n\n# How to Use\n## Parsing\n1. Add a reference\n\nAdd a reference to the nuget package NinjaCsv\n\n2. Setup DTO (data transfer object)\n\n- Create a class to serve as the DTO\n- Add the `Column` attribute to the properties that you want read from the CSV file.\n- **Column construtor accepts an integer which represents the column in the CSV file. This value is ZERO based**.\n- Properties to be mapped MUST have a setter, either public or private.\n- At least one property MUST be mapped but not all properties have to be mapped.\n\n```\npublic class Item\n{\n\t[Column(0)]\n\tpublic int Id {get;set;}\n\t\n\t[Column(1)]\n\tpublic string Name {get; private set;}\n\t\n\tpublic string Description {get;}\n}\n```\n\n3. Call the API\n\nCreate an instance of `CsvParser`\n\n`var parser = new CsvParser();`\n\nCall the `Parse` method where the generic parameter is the DTO, passing in the file path\n`parser.Parse\u003cItem\u003e(@\"C:\\employees.csv\");`\n\nThe `Parse` method also accepts an optional parameter of `CsvParserOptions`. The two options currently available are `ContainsHeaderRow` which defaults to _true_ and `Delimiter` which defaults to comma (,).\n\n## Creating\n1. Add a reference\n\nAdd a reference to the nuget package NinjaCsv\n\n2. Setup DTO (data transfer object)\n\n- Create a class to serve as the DTO\n- Add the `Column` attribute to the properties that you want read from the CSV file.\n- **Column construtor accepts an integer which represents the column in the CSV file. This value is ZERO based**.\n- Properties to be mapped MUST have a setter, either public or private.\n- At least one property MUST be mapped but not all properties have to be mapped.\n\n```\npublic class Item\n{\n\t[Column(0)]\n\tpublic int Id {get;set;}\n\t\n\t[Column(1)]\n\tpublic string Name {get; private set;}\n\t\n\t[Column(2)]\n\tpublic string Description {get;}\n}\n```\n\n3. Call the API\n\nCreate an instance of `CsvCreator`\n\n```\nvar creatpr = new CsvCreator();\nvar list = new List\u003cItem\u003e\n{\n\tnew Item { Id = 1, Name = \"A\"},\n\tnew Item { Id = 2, Name = \"B\"},\n\tnew Item { Id = 3, Description = \"C\"},\n}\n```\n\nCall the `Create` method where the generic parameter is the DTO, passing in the file path and the list of DTOs\n`creatpr.Create\u003cItem\u003e(@\"C:\\employees.csv\", items);`\n\nThe `Create` method also accepts an optional parameter of `CsvCreatorOptions`. The option currently available is `Delimiter` which defaults to comma (,).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fninjacoder88%2Fninja-csv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fninjacoder88%2Fninja-csv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fninjacoder88%2Fninja-csv/lists"}