{"id":36417934,"url":"https://github.com/Tinkoff/phobos","last_synced_at":"2026-01-11T17:01:17.681Z","repository":{"id":37001328,"uuid":"206775653","full_name":"Tinkoff/phobos","owner":"Tinkoff","description":"Efficient and expressive XML data-binding library for Scala","archived":true,"fork":false,"pushed_at":"2023-08-07T22:00:15.000Z","size":902,"stargazers_count":92,"open_issues_count":5,"forks_count":22,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-12-27T01:35:32.108Z","etag":null,"topics":["macros","scala","xml"],"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/Tinkoff.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-09-06T11:00:48.000Z","updated_at":"2025-08-08T15:38:11.000Z","dependencies_parsed_at":"2023-02-18T00:45:59.655Z","dependency_job_id":null,"html_url":"https://github.com/Tinkoff/phobos","commit_stats":null,"previous_names":["tinkoffcreditsystems/phobos"],"tags_count":35,"template":false,"template_full_name":null,"purl":"pkg:github/Tinkoff/phobos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tinkoff%2Fphobos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tinkoff%2Fphobos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tinkoff%2Fphobos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tinkoff%2Fphobos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tinkoff","download_url":"https://codeload.github.com/Tinkoff/phobos/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tinkoff%2Fphobos/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28314259,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T14:58:17.114Z","status":"ssl_error","status_checked_at":"2026-01-11T14:55:53.580Z","response_time":60,"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":["macros","scala","xml"],"created_at":"2026-01-11T17:00:33.336Z","updated_at":"2026-01-11T17:01:17.651Z","avatar_url":"https://github.com/Tinkoff.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# phobos\n[![Maven Central](https://img.shields.io/maven-central/v/ru.tinkoff/phobos-core_2.13.svg)](https://search.maven.org/search?q=ru.tinkoff.phobos-core)\n[![Build](https://github.com/TinkoffCreditSystems/phobos/actions/workflows/scala.yml/badge.svg)](https://github.com/TinkoffCreditSystems/phobos/actions/workflows/scala.yml)\n[![Scala Steward](https://img.shields.io/badge/Scala_Steward-helping-blue.svg?style=flat\u0026logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAMAAAARSr4IAAAAVFBMVEUAAACHjojlOy5NWlrKzcYRKjGFjIbp293YycuLa3pYY2LSqql4f3pCUFTgSjNodYRmcXUsPD/NTTbjRS+2jomhgnzNc223cGvZS0HaSD0XLjbaSjElhIr+AAAAAXRSTlMAQObYZgAAAHlJREFUCNdNyosOwyAIhWHAQS1Vt7a77/3fcxxdmv0xwmckutAR1nkm4ggbyEcg/wWmlGLDAA3oL50xi6fk5ffZ3E2E3QfZDCcCN2YtbEWZt+Drc6u6rlqv7Uk0LdKqqr5rk2UCRXOk0vmQKGfc94nOJyQjouF9H/wCc9gECEYfONoAAAAASUVORK5CYII=)](https://scala-steward.org)\n[![Discord](https://img.shields.io/badge/chat-discord-blue)](https://discord.gg/S9Ad88t)\n\nPhobos is an XML data-binding library based on stream parsing. \nIt depends only on [aalto-xml](https://github.com/FasterXML/aalto-xml/) for parsing.\n\nScala 2.12, 2.13 and 3 are supported. See [Supported Scala versions](#supported-scala-versions) for more details.\n\n## QuickStart\nAdd phobos-core to your dependencies:\n\n```\nlibraryDependencies += \"ru.tinkoff\" %% \"phobos-core\" % \"0.21.0\"\n```\n\nThen try this code out in `sbt console` or in a separate source file:\n```scala\nimport ru.tinkoff.phobos.decoding._\nimport ru.tinkoff.phobos.encoding._\nimport ru.tinkoff.phobos.syntax._\nimport ru.tinkoff.phobos.derivation.semiauto._\n\ncase class TravelPoint(country: String, city: String)\nobject TravelPoint {\n  implicit val travelPointElementEncoder: ElementEncoder[TravelPoint] = deriveElementEncoder\n  implicit val travelPointElementDecoder: ElementDecoder[TravelPoint] = deriveElementDecoder\n}\n\ncase class Price(@attr currency: String, @text value: Double)\nobject Price {\n  implicit val priceElementEncoder: ElementEncoder[Price] = deriveElementEncoder\n  implicit val priceElementDecoder: ElementDecoder[Price] = deriveElementDecoder\n}\n\ncase class Journey(price: Price, departure: TravelPoint, arrival: TravelPoint)\nobject Journey {\n  implicit val journeyXmlEncoder: XmlEncoder[Journey] = deriveXmlEncoder(\"journey\")\n  implicit val journeyXmlDecoder: XmlDecoder[Journey] = deriveXmlDecoder(\"journey\")\n}\n\n\nval journey =\n  Journey(\n    price = Price(\"EUR\", 1000.0),\n    departure = TravelPoint(\"France\", \"Marcelle\"),\n    arrival = TravelPoint(\"Germany\", \"Munich\")\n  )\n\nval xml = XmlEncoder[Journey].encode(journey)\nprintln(xml)\n\nval decodedJourney = xml.flatMap(XmlDecoder[Journey].decode(_))\nprintln(decodedJourney)\n\nassert(Right(journey) == decodedJourney)\n```\nPlease see [phobos wiki](https://github.com/Tinkoff/phobos/wiki) for explanation of the syntax and more details.\n\n## Performance\nPerformance details can be found out in [phobos-benchmark repository](https://github.com/valentiay/phobos-benchmark). \n\n## Modules\nThere are several additional modules for some specific cases. \nThese modules could be added with command below:\n```\nlibraryDependencies += \"ru.tinkoff\" %% \"phobos-\u003cmodule\u003e\" % \"0.21.0\"\n```\nWhere `\u003cmodule\u003e` is module name.\n\n| Module name | Functionality  |\n|-------------|----------------|\n| core-3-0    | Core module compiled for Scala 3.0. |\n| ast         | Support for parsing XML into AST |\n| akka-http   | Marshallers and unmarshallers for [akka-http](https://doc.akka.io/docs/akka-http/current/) |\n| akka-stream | Streaming decoding support for [akka-stream](https://doc.akka.io/docs/akka/current/stream/index.html)|\n| cats        | Cats instances |\n| derevo      | Separate derivation of encoders and decoders separately using [derevo](https://github.com/manatki/derevo) annotations (e.g. `@derive(xmlEncoder(\"foo\"))`)|\n| enumeratum  | Support for [enumeratum](https://github.com/lloydmeta/enumeratum#manual-override-of-name) enums |\n| fs2         | Streaming decoding support (`Stream[F, Array[Byte]] =\u003e G[A]`). Latest fs2 version (fs2 `3.x`, cats effect `3.x`) |\n| fs2-ce2     | Streaming decoding support (`Stream[F, Array[Byte]] =\u003e G[A]`). Same as fs2 module, but for fs2 version `2.x` using cats effect `2.x`  |\n| monix       | Streaming decoding support (`Observable[Array[Byte]] =\u003e Task[A]`)  |\n| refined     | Support for [refined](https://github.com/fthomas/refined) |\n\n\n## Supported Scala versions\nMost modules support Scala 2.12, 2.13 and 3. \nDependencies for some modules don't support Scala 3, thus these modules support only Scala 2.x.\n\nDetailed information about supported Scala versions is in the table below. Available versions for modules are marked with ✓.\n\n| Module name | 2.12 | 2.13 | 3 |\n|-------------|------|------|---|\n| core        |  ✓   |  ✓   | ✓ |\n| akka-http   |  ✓   |  ✓   |   |\n| akka-stream |  ✓   |  ✓   | ✓ |\n| ast         |  ✓   |  ✓   |   |\n| cats        |  ✓   |  ✓   | ✓ |\n| derevo      |  ✓   |  ✓   |   |\n| enumeratum  |  ✓   |  ✓   |   |\n| fs2         |  ✓   |  ✓   | ✓ |\n| fs2-ce2     |  ✓   |  ✓   | ✓ |\n| monix       |  ✓   |  ✓   | ✓ |\n| refined     |  ✓   |  ✓   |   |\n\n## XSD and WSDL code-generation support\nClasses from XSD could be generated using [deimos](https://github.com/Tinkoff/deimos) library.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTinkoff%2Fphobos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTinkoff%2Fphobos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTinkoff%2Fphobos/lists"}