diff options
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, 6 insertions, 2 deletions
diff --git a/src/main/scala/cc/spray/json/package.scala b/src/main/scala/cc/spray/json/package.scala index 362fb7b..a5daedb 100644 --- a/src/main/scala/cc/spray/json/package.scala +++ b/src/main/scala/cc/spray/json/package.scala @@ -16,8 +16,6 @@ package cc.spray -import json.formats.{JsonReader, JsonWriter} - package object json { def jsonReader[T](implicit reader: JsonReader[T]) = reader @@ -25,4 +23,10 @@ package object json { implicit def pimpAny[T :JsonWriter](any: T): PimpedAny[T] = new PimpedAny(any, jsonWriter) +} + +package json { + private[json] class PimpedAny[T](any: T, writer: JsonWriter[T]) { + def toJson: JsValue = writer.write(any) + } }
\ No newline at end of file |