{"id":32957745,"url":"https://github.com/valentiay/phobos","last_synced_at":"2026-03-01T03:32:42.822Z","repository":{"id":230577517,"uuid":"768250136","full_name":"valentiay/phobos","owner":"valentiay","description":"Efficient and expressive XML data-binding library for Scala","archived":false,"fork":false,"pushed_at":"2025-11-13T19:22:04.000Z","size":1039,"stargazers_count":30,"open_issues_count":3,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-13T21:16:12.073Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/valentiay.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":"2024-03-06T18:32:39.000Z","updated_at":"2025-11-13T19:22:09.000Z","dependencies_parsed_at":"2024-03-30T15:47:05.413Z","dependency_job_id":"d5fccb28-04d6-4f87-9c36-8b6e4ebeaa0e","html_url":"https://github.com/valentiay/phobos","commit_stats":null,"previous_names":["valentiay/phobos"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/valentiay/phobos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valentiay%2Fphobos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valentiay%2Fphobos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valentiay%2Fphobos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valentiay%2Fphobos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valentiay","download_url":"https://codeload.github.com/valentiay/phobos/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valentiay%2Fphobos/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29959375,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T01:47:18.291Z","status":"online","status_checked_at":"2026-03-01T02:00:07.437Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-11-12T23:00:31.033Z","updated_at":"2026-03-01T03:32:42.810Z","avatar_url":"https://github.com/valentiay.png","language":"Scala","readme":"# phobos\n[![Maven Central](https://img.shields.io/maven-central/v/dev.valentiay/phobos-core_2.13.svg)](https://search.maven.org/search?q=dev.valentiay.phobos-core)\n[![Build](https://github.com/valentiay/phobos/actions/workflows/scala.yml/badge.svg)](https://github.com/valentiay/phobos/actions/workflows/scala.yml)\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\nIf you find Phobos useful, please consider giving it a star! ⭐\n\n## QuickStart\nAdd phobos-core to your dependencies:\n\n```\nlibraryDependencies += \"dev.valentiay\" %% \"phobos-core\" % \"0.29.0\"\n```\n\nThen try this code out in `sbt console` or in a separate source file:\n```scala\nimport phobos.decoding._\nimport phobos.encoding._\nimport phobos.syntax._\nimport 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 += \"dev.valentiay\" %% \"phobos-\u003cmodule\u003e\" % \"0.29.0\"\n```\nWhere `\u003cmodule\u003e` is module name.\n\n| Module name | Functionality  |\n|-------------|----------------|\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","funding_links":[],"categories":["Table of Contents"],"sub_categories":["XML / HTML"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalentiay%2Fphobos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalentiay%2Fphobos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalentiay%2Fphobos/lists"}