diff --git a/build.sbt b/build.sbt index e11552ef01..6d376a7db1 100644 --- a/build.sbt +++ b/build.sbt @@ -897,7 +897,7 @@ lazy val upickle = (projectMatrix in file("json/upickle")) .nativePlatform(scalaVersions = scala2alive ++ scala3, settings = commonNativeSettings) .dependsOn(core, jsonCommon) -lazy val json4sVersion = "4.0.6" +lazy val json4sVersion = "4.0.7" lazy val json4s = (projectMatrix in file("json/json4s")) .settings(commonJvmSettings) @@ -909,7 +909,7 @@ lazy val json4s = (projectMatrix in file("json/json4s")) ), scalaTest ) - .jvmPlatform(scalaVersions = scala2) + .jvmPlatform(scalaVersions = scala2 ++ scala3) .dependsOn(core, jsonCommon) lazy val sprayJson = (projectMatrix in file("json/spray-json")) diff --git a/json/json4s/src/main/scala/sttp/client3/json4s/SttpJson4sApi.scala b/json/json4s/src/main/scala/sttp/client3/json4s/SttpJson4sApi.scala index f029f9966a..be778260d4 100644 --- a/json/json4s/src/main/scala/sttp/client3/json4s/SttpJson4sApi.scala +++ b/json/json4s/src/main/scala/sttp/client3/json4s/SttpJson4sApi.scala @@ -1,7 +1,7 @@ package sttp.client3.json4s import org.json4s.{Formats, Serialization} -import sttp.client3.{ResponseAs, _} +import sttp.client3._ import sttp.client3.internal.Utf8 import sttp.client3.json._ import sttp.model._ diff --git a/json/json4s/src/test/scala/sttp/client3/Json4sTests.scala b/json/json4s/src/test/scala/sttp/client3/Json4sTests.scala index dba733032e..c5e0e39c9c 100644 --- a/json/json4s/src/test/scala/sttp/client3/Json4sTests.scala +++ b/json/json4s/src/test/scala/sttp/client3/Json4sTests.scala @@ -1,6 +1,7 @@ package sttp.client3 import org.json4s.ParserUtil.ParseException +import org.json4s.native.Serialization import org.json4s.{DefaultFormats, MappingException, native} import org.scalatest._ import sttp.client3.internal._ @@ -11,8 +12,8 @@ import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers class Json4sTests extends AnyFlatSpec with Matchers with EitherValues { - implicit val serialization = native.Serialization - implicit val formats = DefaultFormats + implicit val serialization: Serialization.type = native.Serialization + implicit val formats: DefaultFormats.type = DefaultFormats import Json4sTests._ import json4s._