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 /src | |
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
Diffstat (limited to 'src')
-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 |
3 files changed, 23 insertions, 2 deletions
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 { |