diff options
author | Mathias <mathias@spray.cc> | 2012-10-15 12:24:58 +0200 |
---|---|---|
committer | Mathias <mathias@spray.cc> | 2012-10-15 12:27:02 +0200 |
commit | 6738e705028b9c8ca2a27536f8adfad227df9f36 (patch) | |
tree | 1ac2dc8625cb51c19a59ea62c5659cecfe7ecf0b | |
parent | 72987d6fa81c944470a1b16c1fa9a727c82c459b (diff) | |
download | spray-json-6738e705028b9c8ca2a27536f8adfad227df9f36.tar.gz spray-json-6738e705028b9c8ca2a27536f8adfad227df9f36.tar.bz2 spray-json-6738e705028b9c8ca2a27536f8adfad227df9f36.zip |
Prepare for release 1.2.1v1.2.1
-rw-r--r-- | CHANGELOG | 10 | ||||
-rw-r--r-- | README.markdown | 6 | ||||
-rw-r--r-- | build.sbt | 19 | ||||
-rw-r--r-- | notes/1.2.1.markdown | 2 | ||||
-rw-r--r-- | src/main/ls/1.2.1.json | 21 | ||||
-rw-r--r-- | src/main/scala/spray/json/AdditionalFormats.scala | 2 | ||||
-rw-r--r-- | src/test/scala/spray/json/AdditionalFormatsSpec.scala | 2 |
7 files changed, 51 insertions, 11 deletions
@@ -1,3 +1,9 @@ +Version 1.2.1 (2012-10-15) +-------------------------- +- Upgraded to parboiled 1.1.2 +- Cross-published for Scala 2.9.2 and Scala 2.10.0-RC1 + + Version 1.2 (2012-10-12) ------------------------ - Upgraded to Scala 2.9.2 and parboiled 1.1.1 @@ -11,8 +17,8 @@ Version 1.1.1 (2012-03-13) - Improved automatic field name extraction for case classes -Version 1.1 (2012-02-01) ------------------------- +Version 1.1.0 (2012-02-01) +-------------------------- - Added automatic case class field name extraction via new jsonFormatX overloads - Added 'asJson' pimp to Strings - Added RootJsonFormat (JsonFormat for types corresponding to JSON document roots) diff --git a/README.markdown b/README.markdown index a070bda..3d2c4c4 100644 --- a/README.markdown +++ b/README.markdown @@ -11,11 +11,13 @@ It sports the following features: ### Installation _spray-json_ is available from the [repo.spray.io] repository. -The latest release is `1.2` and is built against Scala 2.9.2. +The latest release is `1.2.1` and is built against Scala 2.9.2 as well as Scala 2.10.0-RC1. If you use SBT you can include _spray-json_ in your project with - "io.spray" %% "spray-json" % "1.2" + "io.spray" %% "spray-json" % "1.2.1" cross CrossVersion.full + +(the trailing "cross CrossVersion.full" modifier is only required for SBT 0.12.x) _spray-json_ has only one dependency: the parsing library [parboiled][] (which is also a dependency of _spray-http_, so if you use _spray-json_ together with other modules of the *spray* @@ -1,6 +1,6 @@ name := "spray-json" -version := "1.2" +version := "1.2.1" organization := "io.spray" @@ -14,12 +14,19 @@ startYear := Some(2011) licenses := Seq("Apache 2" -> new URL("http://www.apache.org/licenses/LICENSE-2.0.txt")) -scalaVersion := "2.9.2" +scalaVersion := "2.10.0-RC1" -scalacOptions := Seq("-deprecation", "-encoding", "utf8") +scalacOptions <<= scalaVersion map { + case x if x startsWith "2.9" => + Seq("-unchecked", "-deprecation", "-encoding", "utf8") + case x if x startsWith "2.10" => + Seq("-feature", "-language:implicitConversions", "-unchecked", "-deprecation", "-encoding", "utf8") +} + +resolvers += "sonatype releases" at "https://oss.sonatype.org/content/repositories/releases/" libraryDependencies ++= Seq( - "org.parboiled" %% "parboiled-scala" % "1.1.1" % "compile", + "org.parboiled" %% "parboiled-scala" % "1.1.2" % "compile", "org.specs2" %% "specs2" % "1.12.2" % "test" ) @@ -30,7 +37,9 @@ scaladocOptions <<= (name, version).map { (n, v) => Seq("-doc-title", n + " " + // publishing /////////////// -credentials += Credentials(Path.userHome / ".ivy2" / ".credentials") +crossScalaVersions := Seq("2.9.2", "2.10.0-RC1") + +scalaBinaryVersion <<= scalaVersion(sV => if (CrossVersion.isStable(sV)) CrossVersion.binaryScalaVersion(sV) else sV) publishMavenStyle := true diff --git a/notes/1.2.1.markdown b/notes/1.2.1.markdown new file mode 100644 index 0000000..851e6e1 --- /dev/null +++ b/notes/1.2.1.markdown @@ -0,0 +1,2 @@ +- Upgraded to parboiled 1.1.2 +- Cross-published for Scala 2.9.2 and Scala 2.10.0-RC1
\ No newline at end of file diff --git a/src/main/ls/1.2.1.json b/src/main/ls/1.2.1.json new file mode 100644 index 0000000..95a4381 --- /dev/null +++ b/src/main/ls/1.2.1.json @@ -0,0 +1,21 @@ +{ + "organization" : "io.spray", + "name" : "spray-json", + "version" : "1.2.1", + "description" : "A Scala library for easy and idiomatic JSON (de)serialization", + "site" : "https://github.com/spray/spray-json", + "tags" : [ "json" ], + "docs" : "http://spray.github.com/spray/api/spray-json/", + "resolvers" : [ "http://repo.spray.io" ], + "dependencies" : [ { + "organization" : "org.parboiled", + "name" : "parboiled-scala", + "version" : "1.1.2" + } ], + "scalas" : [ "2.9.2", "2.10.0-RC1" ], + "licenses" : [ { + "name" : "Apache 2", + "url" : "http://www.apache.org/licenses/LICENSE-2.0.txt" + } ], + "sbt" : false +}
\ No newline at end of file diff --git a/src/main/scala/spray/json/AdditionalFormats.scala b/src/main/scala/spray/json/AdditionalFormats.scala index 20fdc74..cc52f8d 100644 --- a/src/main/scala/spray/json/AdditionalFormats.scala +++ b/src/main/scala/spray/json/AdditionalFormats.scala @@ -94,7 +94,7 @@ trait AdditionalFormats { def safeReader[A :JsonReader] = new JsonReader[Either[Exception, A]] { def read(json: JsValue) = { try { - Right(json.convertTo) + Right(json.convertTo[A]) } catch { case e: Exception => Left(e) } diff --git a/src/test/scala/spray/json/AdditionalFormatsSpec.scala b/src/test/scala/spray/json/AdditionalFormatsSpec.scala index 0a28560..7129fdf 100644 --- a/src/test/scala/spray/json/AdditionalFormatsSpec.scala +++ b/src/test/scala/spray/json/AdditionalFormatsSpec.scala @@ -58,7 +58,7 @@ class AdditionalFormatsSpec extends Specification { case class Foo(id: Long, name: String, foos: Option[List[Foo]] = None) object FooProtocol extends DefaultJsonProtocol { - implicit val FooProtocol: JsonFormat[Foo] = lazyFormat(jsonFormat(Foo, "id", "name", "foos")) + implicit val fooProtocol: JsonFormat[Foo] = lazyFormat(jsonFormat(Foo, "id", "name", "foos")) } "The lazyFormat wrapper" should { |