diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/scala/spray/json/ProductFormats.scala | 2 | ||||
-rw-r--r-- | src/test/scala/spray/json/ProductFormatsSpec.scala | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/scala/spray/json/ProductFormats.scala b/src/main/scala/spray/json/ProductFormats.scala index c3a94e1..8b5843f 100644 --- a/src/main/scala/spray/json/ProductFormats.scala +++ b/src/main/scala/spray/json/ProductFormats.scala @@ -50,7 +50,7 @@ trait ProductFormats extends ProductFormatsInstances { if (reader.isInstanceOf[OptionFormat[_]]) None.asInstanceOf[T] else deserializationError("Object is missing required member '" + fieldName + "'", e) } - case _ => deserializationError("Object expected in field " + fieldName) + case _ => deserializationError("Object expected in field '" + fieldName + "'") } } diff --git a/src/test/scala/spray/json/ProductFormatsSpec.scala b/src/test/scala/spray/json/ProductFormatsSpec.scala index af04505..c969a6f 100644 --- a/src/test/scala/spray/json/ProductFormatsSpec.scala +++ b/src/test/scala/spray/json/ProductFormatsSpec.scala @@ -62,7 +62,7 @@ class ProductFormatsSpec extends Specification { JsObject("b" -> JsNumber(4.2), "a" -> JsNumber(42)).convertTo[Test2] mustEqual obj } "throw a DeserializationException if the JsValue is not a JsObject" in ( - JsNull.convertTo[Test2] must throwA(new DeserializationException("Object expected")) + JsNull.convertTo[Test2] must throwA(new DeserializationException("Object expected in field 'a'")) ) } |