aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Odersky <jakob@odersky.com>2018-03-09 17:06:17 -0800
committerJakob Odersky <jakob@odersky.com>2018-03-09 17:08:20 -0800
commit6557584892aab2bc354ce98e6f9735e3ff46d928 (patch)
treee63acffb9a4eed91e27b18596e6be25613ccd4d1
parentcf7531102305dd9131748eaf486e9519ab454bcb (diff)
downloadspray-json-derivation-6557584892aab2bc354ce98e6f9735e3ff46d928.tar.gz
spray-json-derivation-6557584892aab2bc354ce98e6f9735e3ff46d928.tar.bz2
spray-json-derivation-6557584892aab2bc354ce98e6f9735e3ff46d928.zip
Add companion objects to formatsv0.4.0v0.3.1
-rw-r--r--src/main/scala/DerivedFormats.scala4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/scala/DerivedFormats.scala b/src/main/scala/DerivedFormats.scala
index c3f0811..d0cac38 100644
--- a/src/main/scala/DerivedFormats.scala
+++ b/src/main/scala/DerivedFormats.scala
@@ -78,11 +78,15 @@ trait DerivedFormats { self: BasicFormats =>
macro DerivedFormatMacros.derivedFormat[T]
}
+object DerivedFormats extends DerivedFormats with DefaultJsonProtocol
trait ImplicitDerivedFormats extends DerivedFormats { self: BasicFormats =>
implicit def implicitJsonFormat[T]: RootJsonFormat[T] =
macro DerivedFormatMacros.derivedFormat[T]
}
+object ImplicitDerivedFormats
+ extends ImplicitDerivedFormats
+ with DefaultJsonProtocol
object DerivedFormatMacros {
import scala.reflect.macros.whitebox._