{"id":16697265,"url":"https://github.com/iravid/play-json-cats","last_synced_at":"2025-04-10T02:53:08.648Z","repository":{"id":57725380,"uuid":"79836317","full_name":"iravid/play-json-cats","owner":"iravid","description":"cats typeclass instances for play-json","archived":false,"fork":false,"pushed_at":"2020-03-11T22:12:05.000Z","size":38,"stargazers_count":7,"open_issues_count":2,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T04:22:56.367Z","etag":null,"topics":["cats","functional-programming","json","play-json","scala"],"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/iravid.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-01-23T18:54:30.000Z","updated_at":"2024-05-19T12:20:51.000Z","dependencies_parsed_at":"2022-09-11T19:22:28.231Z","dependency_job_id":null,"html_url":"https://github.com/iravid/play-json-cats","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iravid%2Fplay-json-cats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iravid%2Fplay-json-cats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iravid%2Fplay-json-cats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iravid%2Fplay-json-cats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iravid","download_url":"https://codeload.github.com/iravid/play-json-cats/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248147243,"owners_count":21055503,"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":["cats","functional-programming","json","play-json","scala"],"created_at":"2024-10-12T17:46:50.842Z","updated_at":"2025-04-10T02:53:08.625Z","avatar_url":"https://github.com/iravid.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/iravid/play-json-cats.svg?branch=master)](https://travis-ci.org/iravid/play-json-cats)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.iravid/play-json-cats_2.12/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.iravid/play-json-cats_2.12)\n\n# play-json-cats\n\n`cats` typeclass instances for the `play-json` library.\n\n## Adding as a dependency to your project\n\n```scala\nlibraryDependencies += \"com.iravid\" %% \"play-json-cats\" % 1.1.0\n```\n\n`play-json-cats` is cross-published for Scala 2.11 and 2.12.\n\n## Usage\n\n```scala\nimport cats.implicits._\nimport com.iravid.playjsoncats.implicits._\nimport play.api.libs.json._\n\ncase class Person(name: String, i: Int)\n\nval rn: Reads[String] = Reads(j =\u003e (j \\ \"name\").validate[String])\nval ri: Reads[Int] = Reads(j =\u003e (j \\ \"i\").validate[Int])\nval rp: Reads[Person] = (rn, rp).mapN(Person)\n\nval res: JsResult[Person] = rp.reads(Json.parse(\"\"\"\n  { \"name\": \"iravid\", \"i\": 42 }\n\"\"\"))\n```\n\n## Provided instances\n\n| `play-json` type | provided instances                            |\n|------------------|-----------------------------------------------|\n| `Reads[A]`       | `Functor`, `Applicative`, `Monad`             |\n| `Writes[A]`      | `Contravariant`                               |\n| `Format[A]`      | `Invariant`                                   |\n| `JsResult[A]`    | `Functor`, `Applicative`, `ApplicativeError`  |\n|                  | `Monad`, `MonadError`, `Traverse`,            |\n|                  | `Monoid` (for `A: Monoid`)                    |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firavid%2Fplay-json-cats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Firavid%2Fplay-json-cats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firavid%2Fplay-json-cats/lists"}