diff options
author | Mathias <mathias@spray.cc> | 2011-05-09 09:57:13 +0200 |
---|---|---|
committer | Mathias <mathias@spray.cc> | 2011-05-09 09:57:13 +0200 |
commit | 7146a4af52a888f0cdf1a806cf640ef243e82a6c (patch) | |
tree | c0f41d242f2053674bfe2f6f0b005b8a2b2f0897 /src/main/scala/cc/spray/json/package.scala | |
parent | b9b9ae1bc56362695217bb2a8850586700c0315a (diff) | |
download | spray-json-7146a4af52a888f0cdf1a806cf640ef243e82a6c.tar.gz spray-json-7146a4af52a888f0cdf1a806cf640ef243e82a6c.tar.bz2 spray-json-7146a4af52a888f0cdf1a806cf640ef243e82a6c.zip |
Squash sub package 'formats'
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 |