Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable json4s for scala3 #2251

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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"))
Expand Down
Original file line number Diff line number Diff line change
@@ -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._
Expand Down
5 changes: 3 additions & 2 deletions json/json4s/src/test/scala/sttp/client3/Json4sTests.scala
Original file line number Diff line number Diff line change
@@ -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._
Expand All @@ -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._
Expand Down
Loading