Skip to content

Commit

Permalink
bump play-json-jsoniter to 1.1.1 (#441)
Browse files Browse the repository at this point in the history
Co-authored-by: Nikita Filimonov <[email protected]>
  • Loading branch information
Phill101 and Nikita Filimonov authored Sep 24, 2024
1 parent 5070bca commit 6e17a9e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.evolutiongaming.skafka.producer

import cats.Applicative
import com.evolutiongaming.catshelper.FromTry
import com.evolutiongaming.jsonitertool.PlayJsonJsoniter
import com.evolution.playjson.jsoniter.PlayJsonJsoniter
import com.evolutiongaming.skafka.{ToBytes, Topic}
import play.api.libs.json.{JsValue, Json}

Expand All @@ -14,15 +14,16 @@ trait JsonProducer[F[_]] {

object JsonProducer {

def empty[F[_] : Applicative : FromTry]: JsonProducer[F] = apply(Producer.Send.empty[F])
def empty[F[_]: Applicative: FromTry]: JsonProducer[F] = apply(Producer.Send.empty[F])

implicit def jsValueToBytes[F[_] : FromTry]: ToBytes[F, JsValue] = {
(value: JsValue, _: Topic) => FromTry[F].apply {
implicit def jsValueToBytes[F[_]: FromTry]: ToBytes[F, JsValue] = { (value: JsValue, _: Topic) =>
FromTry[F].apply {
Try(PlayJsonJsoniter.serialize(value)).orElse {
Try(Json.toBytes(value))
}
}
}

def apply[F[_] : FromTry](send: Producer.Send[F]): JsonProducer[F] = (record: ProducerRecord[String, JsValue]) => send(record)
}
def apply[F[_]: FromTry](send: Producer.Send[F]): JsonProducer[F] = (record: ProducerRecord[String, JsValue]) =>
send(record)
}
28 changes: 14 additions & 14 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ import sbt._

object Dependencies {

val `executor-tools` = "com.evolutiongaming" %% "executor-tools" % "1.0.2"
val `config-tools` = "com.evolutiongaming" %% "config-tools" % "1.0.4"
val `future-helper` = "com.evolutiongaming" %% "future-helper" % "1.0.6"
val `cats-helper` = "com.evolutiongaming" %% "cats-helper" % "2.11.0"
val `testcontainers-kafka` = "com.dimafeng" %% "testcontainers-scala-kafka" % "0.40.17"
val `play-json-jsoniter` = "com.evolutiongaming" %% "play-json-jsoniter" % "0.10.0"
val `scala-java8-compat` = "org.scala-lang.modules" %% "scala-java8-compat" % "1.0.2"
val `collection-compat` = "org.scala-lang.modules" %% "scala-collection-compat" % "2.8.1"
val scalatest = "org.scalatest" %% "scalatest" % "3.2.13"
val `kind-projector` = "org.typelevel" % "kind-projector" % "0.13.2"
val discipline = "org.typelevel" %% "discipline-scalatest" % "2.2.0"
val `executor-tools` = "com.evolutiongaming" %% "executor-tools" % "1.0.2"
val `config-tools` = "com.evolutiongaming" %% "config-tools" % "1.0.4"
val `future-helper` = "com.evolutiongaming" %% "future-helper" % "1.0.6"
val `cats-helper` = "com.evolutiongaming" %% "cats-helper" % "2.11.0"
val `testcontainers-kafka` = "com.dimafeng" %% "testcontainers-scala-kafka" % "0.40.17"
val `play-json-jsoniter` = "com.evolution" %% "play-json-jsoniter" % "1.1.1"
val `scala-java8-compat` = "org.scala-lang.modules" %% "scala-java8-compat" % "1.0.2"
val `collection-compat` = "org.scala-lang.modules" %% "scala-collection-compat" % "2.8.1"
val scalatest = "org.scalatest" %% "scalatest" % "3.2.13"
val `kind-projector` = "org.typelevel" % "kind-projector" % "0.13.2"
val discipline = "org.typelevel" %% "discipline-scalatest" % "2.2.0"

object Kafka {
private val version = "3.4.0"
Expand All @@ -34,13 +34,13 @@ object Dependencies {

object Cats {
private val version = "2.8.0"
val core = "org.typelevel" %% "cats-core" % version
val laws = "org.typelevel" %% "cats-laws" % version
val core = "org.typelevel" %% "cats-core" % version
val laws = "org.typelevel" %% "cats-laws" % version
}

object CatsEffect {
private val version = "2.5.5"
val effect = "org.typelevel" %% "cats-effect" % version
val effect = "org.typelevel" %% "cats-effect" % version
}

object Smetrics {
Expand Down
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ThisBuild / version := "11.16.4-SNAPSHOT"
ThisBuild / version := "11.17.0"

0 comments on commit 6e17a9e

Please sign in to comment.