diff options
Diffstat (limited to 'src/test/scala')
-rw-r--r-- | src/test/scala/cc/spray/json/AdditionalFormatsSpec.scala | 2 | ||||
-rw-r--r-- | src/test/scala/cc/spray/json/CustomFormatSpec.scala | 2 | ||||
-rw-r--r-- | src/test/scala/cc/spray/json/ReadmeSpec.scala | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/test/scala/cc/spray/json/AdditionalFormatsSpec.scala b/src/test/scala/cc/spray/json/AdditionalFormatsSpec.scala index 217ae4a..f25c9d8 100644 --- a/src/test/scala/cc/spray/json/AdditionalFormatsSpec.scala +++ b/src/test/scala/cc/spray/json/AdditionalFormatsSpec.scala @@ -51,7 +51,7 @@ class AdditionalFormatsSpec extends Specification { "properly read a Container[Container[List[Int]]] from JSON" in { import ReaderProtocol._ - JsonParser("""{"content":{"content":[1,2,3]}}""").convertTo[Container[Container[List[Int]]]] mustEqual obj + """{"content":{"content":[1,2,3]}}""".asJson.convertTo[Container[Container[List[Int]]]] mustEqual obj } } diff --git a/src/test/scala/cc/spray/json/CustomFormatSpec.scala b/src/test/scala/cc/spray/json/CustomFormatSpec.scala index 237e3f4..e8feb59 100644 --- a/src/test/scala/cc/spray/json/CustomFormatSpec.scala +++ b/src/test/scala/cc/spray/json/CustomFormatSpec.scala @@ -35,7 +35,7 @@ class CustomFormatSpec extends Specification with DefaultJsonProtocol { "A custom JsonFormat built with 'asJsonObject'" should { val value = MyType("bob", 42) "correctly deserialize valid JSON content" in { - JsonParser("""{ "name": "bob", "value": 42 }""").convertTo[MyType] mustEqual value + """{ "name": "bob", "value": 42 }""".asJson.convertTo[MyType] mustEqual value } "support full round-trip (de)serialization" in { value.toJson.convertTo[MyType] mustEqual value diff --git a/src/test/scala/cc/spray/json/ReadmeSpec.scala b/src/test/scala/cc/spray/json/ReadmeSpec.scala index 7e1d246..d60aa69 100644 --- a/src/test/scala/cc/spray/json/ReadmeSpec.scala +++ b/src/test/scala/cc/spray/json/ReadmeSpec.scala @@ -24,8 +24,8 @@ class ReadmeSpec extends Specification { "behave as expected" in { import DefaultJsonProtocol._ - val json = """{ "some": "JSON source" }""" - val jsonAst = JsonParser(json) + val source = """{ "some": "JSON source" }""" + val jsonAst = source.asJson jsonAst mustEqual JsObject("some" -> JsString("JSON source")) val json2 = PrettyPrinter(jsonAst) |