{"id":15523102,"url":"https://github.com/xuwei-k/play-json-extra","last_synced_at":"2025-04-23T03:49:10.584Z","repository":{"id":15602799,"uuid":"18338978","full_name":"xuwei-k/play-json-extra","owner":"xuwei-k","description":"playframework2 json extra module. provide convenience functions for define Format, Reads, Writes","archived":false,"fork":false,"pushed_at":"2025-04-21T21:57:21.000Z","size":234,"stargazers_count":19,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-23T03:49:05.146Z","etag":null,"topics":["json","play-framework","scala","scala-js","serialization"],"latest_commit_sha":null,"homepage":"https://javadoc-badge.appspot.com/com.github.xuwei-k/play-json-extra_2.12/play/jsonext/index.html?javadocio=true","language":"Scala","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/xuwei-k.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-04-01T17:55:33.000Z","updated_at":"2025-04-21T21:57:25.000Z","dependencies_parsed_at":"2023-02-15T19:30:35.054Z","dependency_job_id":"9eba5d40-e728-4260-aaf6-a0e91c189893","html_url":"https://github.com/xuwei-k/play-json-extra","commit_stats":{"total_commits":464,"total_committers":3,"mean_commits":"154.66666666666666","dds":"0.25215517241379315","last_synced_commit":"ed3bc177cf5200029036f2fbdaef1cd24c2ed78c"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuwei-k%2Fplay-json-extra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuwei-k%2Fplay-json-extra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuwei-k%2Fplay-json-extra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuwei-k%2Fplay-json-extra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xuwei-k","download_url":"https://codeload.github.com/xuwei-k/play-json-extra/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250366685,"owners_count":21418768,"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":["json","play-framework","scala","scala-js","serialization"],"created_at":"2024-10-02T10:43:30.970Z","updated_at":"2025-04-23T03:49:10.553Z","avatar_url":"https://github.com/xuwei-k.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# play-json-extra\n\n[![Scala.js](https://www.scala-js.org/assets/badges/scalajs-1.5.0.svg)](https://www.scala-js.org)\n[![scaladoc](https://javadoc.io/badge2/com.github.xuwei-k/play-json-extra_2.13/javadoc.svg)](https://javadoc.io/doc/com.github.xuwei-k/play-json-extra_2.13/latest/play/jsonext/index.html)\n\n- [Maven Central Repository Search](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.github.xuwei-k%22%20AND%20a%3A%22play-json-extra_2.12%22)\n- [Maven Central](https://repo1.maven.org/maven2/com/github/xuwei-k/play-json-extra_2.12/)\n\n### motivation and example\n\nI think following way is so verbose.\n\n```scala\nimport play.api.libs.json._\nimport play.api.libs.functional.syntax._\n\nfinal case class User(id: Long, name: String)\n\nobject User {\n  implicit val format: OFormat[User] = (\n    (__ \\ \"id\").format[Long] and // I want to omit `Long` and `String`\n    (__ \\ \"name\").format[String]\n  )(apply _, Function.unlift(unapply))\n}\n```\n\n[Play provides Json macros](https://www.playframework.com/documentation/2.8.x/ScalaJsonAutomated). Yes it is useful, but I want to **specify Json keys explicitly** sometime like [argonaut casecodecN](https://github.com/argonaut-io/argonaut/blob/v6.2/argonaut/jvm/src/test/scala/argonaut/example/JsonExample.scala#L25)\n\n```scala\nimport play.api.libs.json._\nimport play.jsonext._\n\nfinal case class User(id: Long, name: String)\n\nobject User {\n  implicit val format: OFormat[User] =\n    CaseClassFormats(apply _, unapply _)(\"id\", \"name\")\n}\n```\n\n### latest stable version for play-json 2.8\n\n```scala\nlibraryDependencies += \"com.github.xuwei-k\" %% \"play-json-extra\" % \"0.9.0\"\n```\n\nfor scala-js\n\n```scala\nlibraryDependencies += \"com.github.xuwei-k\" %%% \"play-json-extra\" % \"0.9.0\"\n```\n\n- [API Documentation](https://oss.sonatype.org/service/local/repositories/releases/archive/com/github/xuwei-k/play-json-extra_2.12/0.9.0/play-json-extra_2.12-0.9.0-javadoc.jar/!/index.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxuwei-k%2Fplay-json-extra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxuwei-k%2Fplay-json-extra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxuwei-k%2Fplay-json-extra/lists"}