diff options
author | vlad <vlad@driver.xyz> | 2017-07-11 12:05:51 -0700 |
---|---|---|
committer | vlad <vlad@driver.xyz> | 2017-07-11 12:05:51 -0700 |
commit | 7106d3c23d40f9a38025c171b8add80af2fdba19 (patch) | |
tree | d228292475830e11f85327159defb86bff993f8c /src/main/scala/xyz/driver/core/json.scala | |
parent | 18d50eabc4476c0f1c6a1d776fc380e3968846d8 (diff) | |
download | driver-core-0.13.21.tar.gz driver-core-0.13.21.tar.bz2 driver-core-0.13.21.zip |
Making string to json marshallers not implicitv0.13.21
Diffstat (limited to 'src/main/scala/xyz/driver/core/json.scala')
-rw-r--r-- | src/main/scala/xyz/driver/core/json.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/scala/xyz/driver/core/json.scala b/src/main/scala/xyz/driver/core/json.scala index 1097789..6e780ed 100644 --- a/src/main/scala/xyz/driver/core/json.scala +++ b/src/main/scala/xyz/driver/core/json.scala @@ -213,15 +213,15 @@ object json { } } - implicit val jsValueToStringMarshaller: Marshaller[JsValue, String] = + val jsValueToStringMarshaller: Marshaller[JsValue, String] = Marshaller.strict[JsValue, String](value => Marshalling.Opaque[String](() => value.compactPrint)) - implicit def valueToStringMarshaller[T](implicit jsonFormat: JsonWriter[T]): Marshaller[T, String] = + def valueToStringMarshaller[T](implicit jsonFormat: JsonWriter[T]): Marshaller[T, String] = jsValueToStringMarshaller.compose[T](jsonFormat.write) - implicit val stringToJsValueUnmarshaller: Unmarshaller[String, JsValue] = + val stringToJsValueUnmarshaller: Unmarshaller[String, JsValue] = Unmarshaller.strict[String, JsValue](value => value.parseJson) - implicit def stringToValueUnmarshaller[T](implicit jsonFormat: JsonReader[T]): Unmarshaller[String, T] = + def stringToValueUnmarshaller[T](implicit jsonFormat: JsonReader[T]): Unmarshaller[String, T] = stringToJsValueUnmarshaller.map[T](jsonFormat.read) } |