diff options
author | Jakob Odersky <jakob@odersky.com> | 2018-03-09 17:06:17 -0800 |
---|---|---|
committer | Jakob Odersky <jakob@odersky.com> | 2018-03-09 17:08:20 -0800 |
commit | 6557584892aab2bc354ce98e6f9735e3ff46d928 (patch) | |
tree | e63acffb9a4eed91e27b18596e6be25613ccd4d1 /src | |
parent | cf7531102305dd9131748eaf486e9519ab454bcb (diff) | |
download | spray-json-derivation-6557584892aab2bc354ce98e6f9735e3ff46d928.tar.gz spray-json-derivation-6557584892aab2bc354ce98e6f9735e3ff46d928.tar.bz2 spray-json-derivation-6557584892aab2bc354ce98e6f9735e3ff46d928.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/main/scala/DerivedFormats.scala | 4 |
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._ |