{"id":20171481,"url":"https://github.com/hnaderi/named-codec","last_synced_at":"2025-04-10T02:42:38.110Z","repository":{"id":65508427,"uuid":"524044704","full_name":"hnaderi/named-codec","owner":"hnaderi","description":"Scala3 codec adapter that separates types and payloads","archived":false,"fork":false,"pushed_at":"2025-04-01T02:12:36.000Z","size":183,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-01T03:22:35.194Z","etag":null,"topics":["adapter","codec","encoder-decoder","messaging","scala","scala3"],"latest_commit_sha":null,"homepage":"http://projects.hnaderi.dev/named-codec/","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/hnaderi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-12T10:26:16.000Z","updated_at":"2025-04-01T02:12:40.000Z","dependencies_parsed_at":"2024-04-01T05:31:21.355Z","dependency_job_id":"aa8b4a67-59ed-41c7-ad16-4a4b52d1fb9b","html_url":"https://github.com/hnaderi/named-codec","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hnaderi%2Fnamed-codec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hnaderi%2Fnamed-codec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hnaderi%2Fnamed-codec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hnaderi%2Fnamed-codec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hnaderi","download_url":"https://codeload.github.com/hnaderi/named-codec/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248145040,"owners_count":21055036,"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":["adapter","codec","encoder-decoder","messaging","scala","scala3"],"created_at":"2024-11-14T01:25:03.414Z","updated_at":"2025-04-10T02:42:38.084Z","avatar_url":"https://github.com/hnaderi.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# named-codec\nScala3 codec adapter that separates types and payloads\n\u003ca href=\"https://typelevel.org/cats/\"\u003e\u003cimg src=\"https://typelevel.org/cats/img/cats-badge.svg\" height=\"40px\" align=\"right\" alt=\"Cats friendly\" /\u003e\u003c/a\u003e\n\n[![named-codec-core Scala version support](https://index.scala-lang.org/hnaderi/named-codec/named-codec/latest.svg?style=flat-square)](https://index.scala-lang.org/hnaderi/named-codec/named-codec)\n[![javadoc](https://javadoc.io/badge2/dev.hnaderi/named-codec-docs_3/scaladoc.svg?style=flat-square)](https://javadoc.io/doc/dev.hnaderi/named-codec-docs_3) \n\u003cimg alt=\"GitHub Workflow Status\" src=\"https://img.shields.io/github/actions/workflow/status/hnaderi/named-codec/ci.yml?style=flat-square\"\u003e\n\u003cimg alt=\"GitHub\" src=\"https://img.shields.io/github/license/hnaderi/named-codec?style=flat-square\"\u003e  \n[![Scala Steward badge](https://img.shields.io/badge/Scala_Steward-helping-blue.svg?style=flat-square\u0026logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAMAAAARSr4IAAAAVFBMVEUAAACHjojlOy5NWlrKzcYRKjGFjIbp293YycuLa3pYY2LSqql4f3pCUFTgSjNodYRmcXUsPD/NTTbjRS+2jomhgnzNc223cGvZS0HaSD0XLjbaSjElhIr+AAAAAXRSTlMAQObYZgAAAHlJREFUCNdNyosOwyAIhWHAQS1Vt7a77/3fcxxdmv0xwmckutAR1nkm4ggbyEcg/wWmlGLDAA3oL50xi6fk5ffZ3E2E3QfZDCcCN2YtbEWZt+Drc6u6rlqv7Uk0LdKqqr5rk2UCRXOk0vmQKGfc94nOJyQjouF9H/wCc9gECEYfONoAAAAASUVORK5CYII=)](https://scala-steward.org)\n\nthis is a tiny utility library that provides a simple codec adapter, \nthat helps with creating codec that encode/decode type name separately.\n\nThis is mostly helpful in messaging applications, where payload and message types are separated;\nor for scenarios that you need to store a separate type name to enable type filtering.\n\n### Usage\n\nThis library is currently available for Scala binary version 3.3 on both JVM, JS and native.\n\nTo use the latest version, include the following in your `build.sbt`:\n\n```scala\nlibraryDependencies ++= Seq(\n  \"dev.hnaderi\" %% \"named-codec\" % \"@VERSION@\"\n)\n\n// or circe module directly\n\nlibraryDependencies ++= Seq(\n  \"dev.hnaderi\" %% \"named-codec-circe\" % \"@VERSION@\"\n)\n```\n\n```scala\nenum Data {\n  case A\n  case B(i: Int)\n  case C(s: String, i: Int)\n}\n\nimport io.circe.generic.auto.*\nimport dev.hnaderi.namedcodec.*\n\nval codec = CirceAdapter.of[Data]\n\ncodec.encode(Data.C(\"string\", 101))\n\n// EncodedMessage(name = \"C\", data = { \"s\": \"string\", i: 101 })\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhnaderi%2Fnamed-codec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhnaderi%2Fnamed-codec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhnaderi%2Fnamed-codec/lists"}