Jersey-scala is a project mainly written in Scala, based on the MIT license.
[ABANDONED] A Scala library which adds support to native Scala types in Jersey applications.
Life's too short to use java.util.Collection
Jersey-Scala is a set of classes which add Scala interoperation to Jersey.
First, specify Jersey-Scala as a dependency:
<dependency>
<groupId>com.codahale</groupId>
<artifactId>jersey-scala_${scala.version}</artifactId>
<version>0.2.0</version>
</dependency>
Second, write your resource classes:
@Path("/things")
@Produces("text/plain")
class Things {
@GET
def getAThing(@QueryParam("name") names: Set[String]) = "I found: " + names.mkString(", ")
}
QueryParam
-annotated parameters of type Seq[String]
, List[String]
,
Vector[String]
, IndexedSeq[String]
, Set[String]
, and Option[String]
.AST.JValue
request and response entities.JsonNode
request and response entities.Product
instances) JSON request and response entities.Array[A]
request and response entities. (Due to the JVM's type erasure and
mismatches between Scala and Java type signatures, this is the only "generic"
class supported since Array
type parameters are reified.)Copyright (c) 2010-2011 Coda Hale
Published under The MIT License, see LICENSE