What's jto/validation again ?
jto/validation is a library originally born to replace play-json validation features. It aimed to generalize the library to support other data formats. jto/validation never made it to Play because it was thought to be to big a leap (at least for Play 2.x).
Today, the library supports JSON (both play-json, json4s, and "native"), play forms, XML and CSV. It is also easily extensible to any data format.
Why 2.0 ?
After using v1.x for years, we had a pretty clear idea on how to improve it. Here's are the most important evolutions:
- We got rid of play-functional, and replaced it with cats. Cats is well written, well maintained, well documented, complete and sound, and is a great fit for us.
- Since jto/validation is decoupled from Play, it now supports Scala.js. You can now write Rules and Writes, and share them between the server and the browser.
- The library now has a proper package name, and does not steal Play's anymore.
- jto/validation 2.0 supports Play 2.5.x (via the dedicated playjson module)
- Tests are now automatically run on travis-ci.org.
- Code coverage is now measured, and published automatically on coveralls.io. We'll give the library an even better test coverage in the future releases.
How do I use It ?
The project's README should provide everything needed to start
Where's the doc ?
Is it backward compatible with 1.x ?
Almost ;) You'll have to do a (tiny) bit of work to migrate from 1.x to 2.0. Fear not, the migration has been tested, and the required steps documented here. Migrating should take a few minutes at most. The compiler will also guide you through the migration with deprecation warnings giving clear indications on how to migrate
The library now has a second maintainer: Olivier Blanvillain. Credits for this new version should go to him. He, amongst other things, added Scala.js support, created the git book and replaced play-functional by cats.