Rapture is a family of Scala libraries providing beautiful idiomatic Scala APIs for common programming tasks, like working with I/O, cryptography and JSON & XML processing.
Rapture code is meant to be written and read by humans, so the API is designed so that a single line can concisely convey all the information the programmer needs to understand, without any boilerplate.
Implicits are used to specify configuration choices, offering the advantages of a declarative programming style, with the flexibility of Scala’s scoping rules if necessary.
The power to implement and refactor code confidently comes from the expressiveness of Scala’s type system. Rapture uses extensive typing to help exploit the guidance and constraints Scala’s type system provides.
Rapture is designed around a tiny core, enriched by numerous features added through standard extension points. Because all features are implemented this way, it is very easy to extend Rapture to support your own needs.
Rapture strives for a balance between embracing Scala’s established idioms, and pursuing exciting new ways to approach problems. It is never afraid to use advanced Scala features where they are a good fit, but at the same time never afraid to use simple features where they suffice.
Scala has a dynamic and diverse ecosystem of libraries, often offering many solutions to the same problem. Rapture has no external dependencies, so doesn’t take sides on which libraries you must use, instead using type classes to support multiple alternative implementations.
import rapture._ import core._, io._, net._, uri._, json._, codec._ // Read a file into a string import encodings.`UTF-8` val src = uri"http://rapture.io/sample.json".slurp[Char] // Parse it as Json import jsonBackends.jackson._ val json = Json.parse(src) // Auto-extract a `Vector` of group members into case class instances case class Member(name: String, born: Int) case class Group(groupName: String, members: Set[Member]) json.groups(0).as[Group]
We are pleased to announce that version 1.0 of Rapture JSON has been released!
Jon Pretty will be touring Switzerland, Germany, Czech Republic, Poland, Belgium and France talking about Rapture and Typelevel Scala.
Rapture will be supporting the new Typelevel Scala initiative, and releasing TLS binaries of Rapture when the time comes.