{"id":16176112,"url":"https://github.com/piotr-kalanski/csv2class","last_synced_at":"2026-01-20T07:32:14.630Z","repository":{"id":57722101,"uuid":"90902336","full_name":"piotr-kalanski/csv2class","owner":"piotr-kalanski","description":"CSV reader/writer with conversion to Scala case class","archived":false,"fork":false,"pushed_at":"2017-09-06T10:16:03.000Z","size":39,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"development","last_synced_at":"2025-04-07T18:47:35.879Z","etag":null,"topics":["converter","csv","io","mapping","reader","scala","writer"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/piotr-kalanski.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}},"created_at":"2017-05-10T19:47:40.000Z","updated_at":"2022-04-09T09:40:55.000Z","dependencies_parsed_at":"2022-08-29T22:32:03.698Z","dependency_job_id":null,"html_url":"https://github.com/piotr-kalanski/csv2class","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/piotr-kalanski/csv2class","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piotr-kalanski%2Fcsv2class","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piotr-kalanski%2Fcsv2class/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piotr-kalanski%2Fcsv2class/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piotr-kalanski%2Fcsv2class/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/piotr-kalanski","download_url":"https://codeload.github.com/piotr-kalanski/csv2class/tar.gz/refs/heads/development","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piotr-kalanski%2Fcsv2class/sbom","scorecard":{"id":734714,"data":{"date":"2025-08-11","repo":{"name":"github.com/piotr-kalanski/csv2class","commit":"70d08985b933e53544770c41b5e1a525d62ea2f9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/10 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'development'","Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 17 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T15:26:49.679Z","repository_id":57722101,"created_at":"2025-08-22T15:26:49.679Z","updated_at":"2025-08-22T15:26:49.679Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28598151,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T02:08:49.799Z","status":"ssl_error","status_checked_at":"2026-01-20T02:08:44.148Z","response_time":117,"last_error":"SSL_read: 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":["converter","csv","io","mapping","reader","scala","writer"],"created_at":"2024-10-10T04:47:44.138Z","updated_at":"2026-01-20T07:32:14.607Z","avatar_url":"https://github.com/piotr-kalanski.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# csv2class\nGeneric CSV reader/writer with conversion to Scala case class without boilerplate\n\n[![Build Status](https://api.travis-ci.org/piotr-kalanski/csv2class.png?branch=development)](https://api.travis-ci.org/piotr-kalanski/csv2class.png?branch=development)\n[![codecov.io](http://codecov.io/github/piotr-kalanski/csv2class/coverage.svg?branch=development)](http://codecov.io/github/piotr-kalanski/csv2class/coverage.svg?branch=development)\n[\u003cimg src=\"https://img.shields.io/maven-central/v/com.github.piotr-kalanski/csv2class_2.11.svg?label=latest%20release\"/\u003e](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22csv2class_2.11%22)\n[![License](http://img.shields.io/:license-Apache%202-red.svg)](http://www.apache.org/licenses/LICENSE-2.0.txt)\n\n# Table of contents\n\n- [Goals](#goals)\n- [Getting started](#getting-started)\n- [Examples](#examples)\n- [Versioning support](#versioning-support)\n- [Complex types](#complex-types)\n- [Customizations](#customizations)\n\n# Goals\n\n- Read and convert CSV files to Scala case classes\n- Write Scala case classes to CSV\n\n# Getting started\n\nInclude dependency:\n\n```scala\n\"com.github.piotr-kalanski\" % \"csv2class_2.11\" % \"0.3.3\"\n```\n\nor\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.piotr-kalanski\u003c/groupId\u003e\n    \u003cartifactId\u003ecsv2class_2.11\u003c/artifactId\u003e\n    \u003cversion\u003e0.3.3\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nFor reading from CSV import:\n```scala\nimport com.datawizards.csv2class._\n```\n\nFor writing to CSV import:\n```scala\nimport com.datawizards.class2csv._\n```\n\n# Examples\n\n## Reading from CSV\n\n### Basic example:\n\nCSV file:\n```\ns,i\nfirst,10\nsecond,11\n```\n\nParsing command:\n```scala\ncase class Foo(s: String, i: Int)\nparseCSV[Foo](\"foo.csv\")\n```\n\nresult:\n```scala\nFoo(\"first\",10),\nFoo(\"second\",11)\n```\n\n### Different order of columns\n\nCSV file:\n```csv\ni,s\n10,first\n11,second\n```\n\nParsing command:\n```scala\nparseCSV[Foo](\"foo.csv\")\n```\n\nresult:\n```scala\nFoo(\"first\",10),\nFoo(\"second\",11)\n```\n\n### Returning not parsed rows\n\nCSV file:\n```\ns,i\nfirst,10\nsecond,11\nthird,third\n```\n\n```scala\nparseCSV[Foo](\"foo.csv\")\n```\n\nresult:\n```scala\nFoo(first,10)\nFoo(second,11)\njava.lang.NumberFormatException: For input string: \"third\"\n```\n\n## Writing to CSV\n\n```scala\ncase class Foo(s: String, i: Int)\n\nval data = Seq(\n  Foo(\"first\",10),\n  Foo(\"second\",11)\n)\n\nwriteCSV(data, file)\n```\n\n# Versioning support\n\nFirst write below data to CSV:\n\n```scala\ncase class PersonV2(name: String, age: Int, title: Option[String])\nval peopleV2 = Seq(\n    PersonV2(\"p1\", 10, Some(\"Developer\")),\n    PersonV2(\"p2\", 20, None),\n    PersonV2(\"p3\", 30, None)\n)\nwriteCSV(peopleV2, file)\n```\n\nRead CSV file with previous version of compatible Person model:\n```scala\ncase class Person(name: String, age: Int)\nparseCSV[Person](file)\n```\n\nresult:\n```scala\nSeq(\n  Person(\"p1\", 10),\n  Person(\"p2\", 20),\n  Person(\"p3\", 30)\n)\n```\n\nRead CSV file using newer compatible Person model version - new columns should be `Option` type.\n\n```scala\ncase class PersonV3(name: String, age: Int, title: Option[String], salary: Option[Long])\nparseCSV[PersonV3](file)\n```\n\nresult:\n```scala\nSeq(\n  PersonV3(\"p1\", 10, Some(\"Developer\"), None),\n  PersonV3(\"p2\", 20, None, None),\n  PersonV3(\"p3\", 30, None, None)\n)\n```\n\n# Complex types\n\nLibrary supports writing fields with complex types (e.g. case class, Seq) by serializing them usin JSON format.\n\nExample:\n\n```scala\ncase class ClassWithArrayOfStruct(\n  id: String,\n  people: Seq[Person]\n)\ncase class Person(name: String, age: Int)\n\nval data = Seq(\n  ClassWithArrayOfStruct(\"1\",Seq(Person(\"p1\", 10))),\n  ClassWithArrayOfStruct(\"2\",Seq(Person(\"p1\", 10),Person(\"p2\", 20),Person(\"p3\", 30)))\n)\n\nwriteCSV(data, file)\n```\nresult:\n```\nid,people\n1,\"[{\"\"name\"\":\"\"p1\"\",\"\"age\"\":10}]\"\n2,\"[{\"\"name\"\":\"\"p1\"\",\"\"age\"\":10},{\"\"name\"\":\"\"p2\"\",\"\"age\"\":20},{\"\"name\"\":\"\"p3\"\",\"\"age\"\":30}]\"\n```\n\n# Customizations\n\n## Change delimiter\n\n```scala\nparseCSV[Foo](\"file.csv\", delimiter = ';')\nwriteCSV(data, file, delimiter = ';')\n```\n\n## CSV without header\n\n```scala\nparseCSV[Foo](\"file.csv\", header = false, columns = Seq(\"s\",\"i\"))\nwriteCSV(data, \"file.csv\", header = false)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiotr-kalanski%2Fcsv2class","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiotr-kalanski%2Fcsv2class","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiotr-kalanski%2Fcsv2class/lists"}