diff options
-rw-r--r-- | build.sbt | 4 | ||||
-rw-r--r-- | src/test/scala/spray/json/ProductFormatsSpec.scala | 11 |
2 files changed, 13 insertions, 2 deletions
@@ -14,7 +14,7 @@ startYear := Some(2011) licenses := Seq("Apache 2" -> new URL("http://www.apache.org/licenses/LICENSE-2.0.txt")) -scalaVersion := "2.10.0-RC3" +scalaVersion := "2.10.0-RC5" scalacOptions <<= scalaVersion map { case x if x startsWith "2.9" => @@ -37,7 +37,7 @@ scaladocOptions <<= (name, version).map { (n, v) => Seq("-doc-title", n + " " + // publishing /////////////// -crossScalaVersions := Seq("2.9.2", "2.10.0-RC3") +crossScalaVersions := Seq("2.9.2", "2.10.0-RC5") scalaBinaryVersion <<= scalaVersion(sV => if (CrossVersion.isStable(sV)) CrossVersion.binaryScalaVersion(sV) else sV) diff --git a/src/test/scala/spray/json/ProductFormatsSpec.scala b/src/test/scala/spray/json/ProductFormatsSpec.scala index e452639..ec9d65f 100644 --- a/src/test/scala/spray/json/ProductFormatsSpec.scala +++ b/src/test/scala/spray/json/ProductFormatsSpec.scala @@ -84,4 +84,15 @@ class ProductFormatsSpec extends Specification { } } + "A JsonFormat for a generic case class with an explicitly provided type parameter" should { + "support the jsonFormat1 syntax" in { + case class Box[A](a: A) + object BoxProtocol extends DefaultJsonProtocol { + implicit val boxFormat = jsonFormat1(Box[Int]) + } + import BoxProtocol._ + Box(42).toJson === JsObject(Map("a" -> JsNumber(42))) + } + } + } |