diff options
author | Mathias <mathias@spray.cc> | 2011-05-25 00:18:33 +0200 |
---|---|---|
committer | Mathias <mathias@spray.cc> | 2011-05-25 00:18:33 +0200 |
commit | d9ee63c346050430f7c52d4d9cb6108809950a36 (patch) | |
tree | 7c44e296e6db881bc7791a344cbe5277ef20f738 /src/main/scala/cc/spray/json/package.scala | |
parent | 57bc594e1daa7dff6013759d6fc65f183118aa33 (diff) | |
download | spray-json-d9ee63c346050430f7c52d4d9cb6108809950a36.tar.gz spray-json-d9ee63c346050430f7c52d4d9cb6108809950a36.tar.bz2 spray-json-d9ee63c346050430f7c52d4d9cb6108809950a36.zip |
Improve 'toJson' pimp
Diffstat (limited to 'src/main/scala/cc/spray/json/package.scala')
-rw-r--r-- | src/main/scala/cc/spray/json/package.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/scala/cc/spray/json/package.scala b/src/main/scala/cc/spray/json/package.scala index a5daedb..ee50ec0 100644 --- a/src/main/scala/cc/spray/json/package.scala +++ b/src/main/scala/cc/spray/json/package.scala @@ -21,12 +21,12 @@ package object json { def jsonReader[T](implicit reader: JsonReader[T]) = reader def jsonWriter[T](implicit writer: JsonWriter[T]) = writer - implicit def pimpAny[T :JsonWriter](any: T): PimpedAny[T] = new PimpedAny(any, jsonWriter) - + implicit def pimpAny[T](any: T): PimpedAny[T] = new PimpedAny(any) + } package json { - private[json] class PimpedAny[T](any: T, writer: JsonWriter[T]) { - def toJson: JsValue = writer.write(any) + private[json] class PimpedAny[T](any: T) { + def toJson(implicit writer: JsonWriter[T]): JsValue = writer.write(any) } }
\ No newline at end of file |