https://github.com/lucidsoftware/xtract
A library to make it easy to deserialize XML to user types in scala
https://github.com/lucidsoftware/xtract
deserialization scala xml
Last synced: 6 months ago
JSON representation
A library to make it easy to deserialize XML to user types in scala
- Host: GitHub
- URL: https://github.com/lucidsoftware/xtract
- Owner: lucidsoftware
- License: apache-2.0
- Created: 2016-02-02T21:46:55.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-05-13T08:39:47.000Z (about 3 years ago)
- Last Synced: 2024-04-16T09:04:52.006Z (about 2 years ago)
- Topics: deserialization, scala, xml
- Language: Scala
- Size: 2.46 MB
- Stars: 59
- Watchers: 13
- Forks: 20
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# xtract
[](https://travis-ci.com/lucidsoftware/xtract)
Xtract is a scala library for deserializing XML. It is heavily inspired by the combinators in the [Play JSON library][1], in particular the [`Reads[T]`][2] class.
See the [introductory blog post](https://www.lucidchart.com/techblog/2016/07/12/introducing-xtract-a-new-xml-deserialization-library-for-scala/).
## Usage
To use Xtract in your sbt project add the [following dependency](https://mvnrepository.com/artifact/com.lucidchart/xtract):
``` scala
"com.lucidchart" %% "xtract" % "2.2.1"
```
There is also an `xtract-testing` artifact which provides helpful matchers and other functions for use with
specs2. To use in your test you can add the [following sbt dependency](https://mvnrepository.com/artifact/com.lucidchart/xtract-testing):
``` scala
"com.lucidchart" %% "xtract-testing" % "2.2.1" % "test"
```
## Documentation
The scaladoc API for the core functionality is available at http://lucidsoftware.github.io/xtract/core/api/com/lucidchart/open/xtract/index.html.
Scaladocs for the specs2 extensions is available at http://lucidsoftware.github.io/xtract/testing/api/com/lucidchart/open/xtract/index.html.
## Example
An example project using xtract can be found at http://github.com/lucidsoftware/xtract-example.
[1]: https://www.playframework.com/documentation/2.5.x/ScalaJsonCombinators
[2]: https://www.playframework.com/documentation/2.5.x/api/scala/index.html#play.api.libs.json.Reads