diff --git a/akka-http-circe/src/main/scala/de/heikoseeberger/akkahttpcirce/CirceSupport.scala b/akka-http-circe/src/main/scala/de/heikoseeberger/akkahttpcirce/CirceSupport.scala index 2bb84062..5e96de7b 100644 --- a/akka-http-circe/src/main/scala/de/heikoseeberger/akkahttpcirce/CirceSupport.scala +++ b/akka-http-circe/src/main/scala/de/heikoseeberger/akkahttpcirce/CirceSupport.scala @@ -54,9 +54,7 @@ object ErrorAccumulatingCirceSupport extends ErrorAccumulatingCirceSupport * * To use automatic codec derivation import `io.circe.generic.auto._`. */ -trait ErrorAccumulatingCirceSupport - extends BaseCirceSupport - with ErrorAccumulatingUnmarshaller +trait ErrorAccumulatingCirceSupport extends BaseCirceSupport with ErrorAccumulatingUnmarshaller @deprecated(message = "Use either FailFastCirceSupport or ErrorAccumulatingCirceSupport", since = "1.13.0") @@ -79,7 +77,9 @@ trait BaseCirceSupport { * * @return marshaller for JSON value */ - implicit final def jsonMarshaller(implicit printer: Printer = Printer.noSpaces): ToEntityMarshaller[Json] = + implicit final def jsonMarshaller( + implicit printer: Printer = Printer.noSpaces + ): ToEntityMarshaller[Json] = Marshaller.withFixedContentType(`application/json`) { json => HttpEntity(`application/json`, printer.pretty(json)) } @@ -90,7 +90,9 @@ trait BaseCirceSupport { * @tparam A type to encode * @return marshaller for any `A` value */ - implicit final def marshaller[A: Encoder](implicit printer: Printer = Printer.noSpaces): ToEntityMarshaller[A] = + implicit final def marshaller[A: Encoder]( + implicit printer: Printer = Printer.noSpaces + ): ToEntityMarshaller[A] = jsonMarshaller(printer).compose(implicitly[Encoder[A]].apply) /** diff --git a/akka-http-circe/src/test/scala/de/heikoseeberger/akkahttpcirce/CirceSupportSpec.scala b/akka-http-circe/src/test/scala/de/heikoseeberger/akkahttpcirce/CirceSupportSpec.scala index 3f1af671..ca268007 100644 --- a/akka-http-circe/src/test/scala/de/heikoseeberger/akkahttpcirce/CirceSupportSpec.scala +++ b/akka-http-circe/src/test/scala/de/heikoseeberger/akkahttpcirce/CirceSupportSpec.scala @@ -95,12 +95,12 @@ final class CirceSupportSpec extends AsyncWordSpec with Matchers with BeforeAndA val optionFoo = OptionFoo(None) Marshal(optionFoo) .to[RequestEntity] - .map(_.asInstanceOf[HttpEntity.Strict].data.decodeString("UTF-8") shouldBe "{\"a\":null}") + .map(_.asInstanceOf[HttpEntity.Strict].data.decodeString("UTF-8") shouldBe "{\"a\":null}") } "not write None" in { implicit val printer = Printer.noSpaces.copy(dropNullKeys = true) - val optionFoo = OptionFoo(None) + val optionFoo = OptionFoo(None) Marshal(optionFoo) .to[RequestEntity] .map(_.asInstanceOf[HttpEntity.Strict].data.decodeString("UTF-8") shouldBe "{}") diff --git a/build.sbt b/build.sbt index 36c6cd5c..7821facb 100644 --- a/build.sbt +++ b/build.sbt @@ -107,9 +107,9 @@ lazy val library = object Version { final val akka = "2.4.17" final val akkaHttp = "10.0.5" - final val argonaut = "6.2-RC2" + final val argonaut = "6.2" final val circe = "0.7.1" - final val jacksonScala = "2.8.7" + final val jacksonScala = "2.8.8" final val json4s = "3.5.1" final val play = "2.6.0-M6" final val scala = "2.12.1" diff --git a/project/plugins.sbt b/project/plugins.sbt index 0e191ce8..689018ef 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,6 +1,8 @@ -addSbtPlugin("com.dwijnand" % "sbt-travisci" % "1.0.0") -addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "0.6.5") +addSbtPlugin("com.dwijnand" % "sbt-travisci" % "1.1.0") +addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "0.6.6") addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0") -addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.8.5") +addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.9.2") addSbtPlugin("de.heikoseeberger" % "sbt-header" % "1.8.0") addSbtPlugin("me.lessis" % "bintray-sbt" % "0.3.0") + +libraryDependencies += "org.slf4j" % "slf4j-nop" % "1.7.25" // Needed by sbt-git