{"id":24534390,"url":"https://github.com/quincyjo/braid","last_synced_at":"2026-05-19T00:37:32.155Z","repository":{"id":273439087,"uuid":"867176216","full_name":"quincyjo/braid","owner":"quincyjo","description":"Scala Middleware for writing libraries against JSON generically.","archived":false,"fork":false,"pushed_at":"2025-02-04T18:07:34.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-04T18:40:27.843Z","etag":null,"topics":["json","middleware","scala","tool","tools"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quincyjo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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":"2024-10-03T15:24:58.000Z","updated_at":"2025-02-04T18:07:38.000Z","dependencies_parsed_at":"2025-01-20T23:35:01.505Z","dependency_job_id":null,"html_url":"https://github.com/quincyjo/braid","commit_stats":null,"previous_names":["quincyjo/braid"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quincyjo%2Fbraid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quincyjo%2Fbraid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quincyjo%2Fbraid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quincyjo%2Fbraid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quincyjo","download_url":"https://codeload.github.com/quincyjo/braid/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243797599,"owners_count":20349432,"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","middleware","scala","tool","tools"],"created_at":"2025-01-22T11:17:07.437Z","updated_at":"2026-05-19T00:37:32.111Z","avatar_url":"https://github.com/quincyjo.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Braid\n\nCurrently there are several mainstream JSON libraries for Scala. While many of these libraries have similar ASTs and\nAPIs, they are distinct and are inherently different types. This means that when a library is written to add\nfunctionality which relies on JSON data, it is more often then not written against a specific JSON library's\nimplementation. This prevents such libraries from being used in applications where a different JSON library is used.\n\nBraid is a normalized API for implementing Scala code against JSON independently of the underlying JSON library. This\nallows libraries that require a JSON implementation to be implemented generically and automatically gain support for any\nJSON library which is part of the braid. Braid currently provides support for Circe JSON, Play JSON, and Json4s\nnatively, but other JSON libraries may be added in the future, and local braid implementations may be provided as well.\n\nSupported JSON Libraries:\n\n| Library                                                 |     Scala 2.13     |     Scala 3.X      |\n|---------------------------------------------------------|:------------------:|:------------------:|\n| [Circe JSON](https://github.com/circe/circe)            | :white_check_mark: | :white_check_mark: |\n| [Play JSON](https://github.com/playframework/play-json) | :white_check_mark: | :white_check_mark: |\n| [Json4s](https://github.com/json4s/json4s)              | :white_check_mark: | :white_check_mark: |\n\n## Getting Started\n\nTo get started, you can add braid as a dependency in your project:\n\n* sbt\n  ```scala\n  libraryDependencies += \"com.quincyjo\" %% \"braid\" % -version-\n  ```\n* Gradle\n  ```\n  compile group: 'com.quincyjo', name: 'braid_2.13', version: -version-\n  ```\n* Maven\n  ```xml\n  \u003cdependency\u003e\n    \u003cgroupId\u003ecom.quincyjo\u003c/groupId\u003e\n    \u003cartifactId\u003ebraid_2.13\u003c/artifactId\u003e\n    \u003cversion\u003e-version-\u003c/version\u003e\n  \u003c/dependency\u003e\n  ```\n\nSee [GitHub releases](https://github.com/quincyjo/braid/releases) for the correct version.\n\n## Usage\n\nExample usage of creating, accessing, and mutating JSON generically. All functions used are provided by Braid, while the\nunderlying JSON type is a Play `JsValue`.\n\n```scala\nscala \u003e\nval json = implicitly[Braid[JsValue]].fromString(\"foobar\")\nval json: play.api.libs.json.JsValue = \"foobar\"\n\nscala \u003e json.isString\nval res0: Boolean = true\n\nscala \u003e json.isNumber\nval res1: Boolean = false\n\nscala \u003e json.asString\nval res2: Option[String] = Some(foobar)\n\nscala \u003e json.mapString(string =\u003e s\"$string mutated\")\nval res3: play.api.libs.json.JsValue = \"foobar mutated\"\n\nscala \u003e json.mapNumber(_ + 3)\nval res4: play.api.libs.json.JsValue = \"foobar\"\n```\n\n## Additional Modules\n\n### Circe Support\n\nProvided Braid for [Circe JSON](https://github.com/circe/circe).\n\n```\nlibraryDependencies += \"com.quincyjo\" %% \"braid-circe\" % -version-\n```\n\n### Play Support\n\nProvided Braid for [Play JSON](https://github.com/playframework/play-json).\n\n```\nlibraryDependencies += \"com.quincyjo\" %% \"braid-play\" % -version-\n```\n\n### Json4s Support\n\nProvided Braid for [Json4s](https://github.com/json4s/json4s).\n\n```\nlibraryDependencies += \"com.quincyjo\" %% \"braid-json4s\" % -version-\n```\n\n### JSON Operations\n\nThe `braid-json-operations` module provides support for JSON operations, meaning performing Javascript style operators\non JSON values; EG, `\"1\" + 1`. Type coercion is also supported, and operators here follow ES6 coercion rules. This is\nmeant for libraries which need to support JSON operations for evaluation within Scala. Examples include JSON logic and\nJSON path.\n\nThe JSON operations module may be added to a project with the following dependency:\n\n```scala\nlibraryDependencies += \"com.quincyjo\" %% \"braid-json-operations\" % -version -\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquincyjo%2Fbraid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquincyjo%2Fbraid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquincyjo%2Fbraid/lists"}