Skip to content

Commit af168b8

Browse files
committed
Update zio-json to 0.7.6 and zio-schema-json to 1.6.1
1 parent ad91a27 commit af168b8

File tree

10 files changed

+16
-29
lines changed

10 files changed

+16
-29
lines changed

build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ lazy val `jsoniter-scala-benchmark` = crossProject(JVMPlatform, JSPlatform)
243243
"com.disneystreaming.smithy4s" %%% "smithy4s-json" % "0.18.29",
244244
"com.evolutiongaming" %%% "play-json-jsoniter" % "0.10.3" intransitive(),
245245
"org.playframework" %%% "play-json" % "3.0.4",
246-
"dev.zio" %%% "zio-json" % "0.7.4",
247-
"dev.zio" %%% "zio-schema-json" % "1.5.0",
246+
"dev.zio" %%% "zio-json" % "0.7.6",
247+
"dev.zio" %%% "zio-schema-json" % "1.6.1",
248248
"io.circe" %%% "circe-generic" % "0.14.10",
249249
"io.circe" %%% "circe-jawn" % "0.14.10",
250250
"com.lihaoyi" %%% "upickle" % "4.1.0",

jsoniter-scala-benchmark/js/src/main/scala-2/com/github/plokhotnyuk/jsoniter_scala/benchmark/Main.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1420,9 +1420,8 @@ object Main {
14201420
B("playJsonJsoniter")(benchmark.playJsonJsoniter()),
14211421
B("smithy4sJson")(benchmark.smithy4sJson()),
14221422
B("uPickle")(benchmark.uPickle()),
1423-
B("zioJson")(benchmark.zioJson())
1424-
//FIXME: zio-schema-json parses only 127 levels of nesting instead of 128
1425-
//B("zioSchemaJson")(benchmark.zioSchemaJson())
1423+
B("zioJson")(benchmark.zioJson()),
1424+
B("zioSchemaJson")(benchmark.zioSchemaJson())
14261425
))
14271426
}, {
14281427
val benchmark = new NestedStructsWriting { size = 128; setup() }

jsoniter-scala-benchmark/js/src/main/scala-3/com/github/plokhotnyuk/jsoniter_scala/benchmark/Main.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,9 +1319,8 @@ object Main {
13191319
B("playJsonJsoniter")(benchmark.playJsonJsoniter()),
13201320
B("smithy4sJson")(benchmark.smithy4sJson()),
13211321
B("uPickle")(benchmark.uPickle()),
1322-
B("zioJson")(benchmark.zioJson())
1323-
//FIXME: zio-schema-json parses only 127 levels of nesting instead of 128
1324-
//B("zioSchemaJson")(benchmark.zioSchemaJson())
1322+
B("zioJson")(benchmark.zioJson()),
1323+
B("zioSchemaJson")(benchmark.zioSchemaJson())
13251324
))
13261325
}, {
13271326
val benchmark = new NestedStructsWriting { size = 128; setup() }

jsoniter-scala-benchmark/js/src/test/scala-2/com/github/plokhotnyuk/jsoniter_scala/benchmark/NestedStructsReadingSpec.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ class NestedStructsReadingSpec extends BenchmarkSpecBase {
2020
benchmark.smithy4sJson() shouldBe benchmark.obj
2121
benchmark.uPickle() shouldBe benchmark.obj
2222
benchmark.zioJson() shouldBe benchmark.obj
23-
//FIXME: zio-schema-json parses only 127 levels of nesting instead of 128
24-
//benchmark.zioSchemaJson() shouldBe benchmark.obj
23+
benchmark.zioSchemaJson() shouldBe benchmark.obj
2524
}
2625
"fail on invalid input" in {
2726
val b = benchmark
@@ -35,8 +34,7 @@ class NestedStructsReadingSpec extends BenchmarkSpecBase {
3534
intercept[Throwable](b.smithy4sJson())
3635
intercept[Throwable](b.uPickle())
3736
intercept[Throwable](b.zioJson())
38-
//FIXME: zio-schema-json parses only 127 levels of nesting instead of 128
39-
//intercept[Throwable](b.zioJson())
37+
intercept[Throwable](b.zioSchemaJson())
4038
}
4139
}
4240
}

jsoniter-scala-benchmark/js/src/test/scala-3/com/github/plokhotnyuk/jsoniter_scala/benchmark/NestedStructsReadingSpec.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ class NestedStructsReadingSpec extends BenchmarkSpecBase {
1919
benchmark.smithy4sJson() shouldBe benchmark.obj
2020
benchmark.uPickle() shouldBe benchmark.obj
2121
benchmark.zioJson() shouldBe benchmark.obj
22-
//FIXME: zio-schema-json parses only 127 levels of nesting instead of 128
23-
//benchmark.zioSchemaJson() shouldBe benchmark.obj
22+
benchmark.zioSchemaJson() shouldBe benchmark.obj
2423
}
2524
"fail on invalid input" in {
2625
val b = benchmark
@@ -33,8 +32,7 @@ class NestedStructsReadingSpec extends BenchmarkSpecBase {
3332
intercept[Throwable](b.smithy4sJson())
3433
intercept[Throwable](b.uPickle())
3534
intercept[Throwable](b.zioJson())
36-
//FIXME: zio-schema-json parses only 127 levels of nesting instead of 128
37-
//intercept[Throwable](b.zioSchemaJson())
35+
intercept[Throwable](b.zioSchemaJson())
3836
}
3937
}
4038
}

jsoniter-scala-benchmark/jvm/src/test/scala-2/com/github/plokhotnyuk/jsoniter_scala/benchmark/NestedStructsReadingSpec.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ class NestedStructsReadingSpec extends BenchmarkSpecBase {
2626
benchmark.uPickle() shouldBe benchmark.obj
2727
benchmark.weePickle() shouldBe benchmark.obj
2828
benchmark.zioJson() shouldBe benchmark.obj
29-
//FIXME: zio-schema-json parses only 127 levels of nesting instead of 128
30-
//benchmark.zioSchemaJson() shouldBe benchmark.obj
29+
benchmark.zioSchemaJson() shouldBe benchmark.obj
3130
}
3231
"fail on invalid input" in {
3332
val b = benchmark
@@ -48,8 +47,7 @@ class NestedStructsReadingSpec extends BenchmarkSpecBase {
4847
intercept[Throwable](b.uPickle())
4948
intercept[Throwable](b.weePickle())
5049
intercept[Throwable](b.zioJson())
51-
//FIXME: zio-schema-json parses only 127 levels of nesting instead of 128
52-
//intercept[Throwable](b.zioSchemaJson())
50+
intercept[Throwable](b.zioSchemaJson())
5351
}
5452
}
5553
}

jsoniter-scala-benchmark/jvm/src/test/scala-3/com/github/plokhotnyuk/jsoniter_scala/benchmark/NestedStructsReadingSpec.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ class NestedStructsReadingSpec extends BenchmarkSpecBase {
2424
benchmark.uPickle() shouldBe benchmark.obj
2525
benchmark.weePickle() shouldBe benchmark.obj
2626
benchmark.zioJson() shouldBe benchmark.obj
27-
//FIXME: zio-schema-json parses only 127 levels of nesting instead of 128
28-
//benchmark.zioSchemaJson() shouldBe benchmark.obj
27+
benchmark.zioSchemaJson() shouldBe benchmark.obj
2928
}
3029
"fail on invalid input" in {
3130
val b = benchmark
@@ -44,8 +43,7 @@ class NestedStructsReadingSpec extends BenchmarkSpecBase {
4443
intercept[Throwable](b.uPickle())
4544
intercept[Throwable](b.weePickle())
4645
intercept[Throwable](b.zioJson())
47-
//FIXME: zio-schema-json parses only 127 levels of nesting instead of 128
48-
//intercept[Throwable](b.zioSchemaJson())
46+
intercept[Throwable](b.zioSchemaJson())
4947
}
5048
}
5149
}

jsoniter-scala-benchmark/shared/src/main/scala-2/com/github/plokhotnyuk/jsoniter_scala/benchmark/NestedStructsReading.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,12 @@ class NestedStructsReading extends NestedStructsBenchmark {
134134

135135
new String(jsonBytes, UTF_8).fromJson[NestedStructs].fold(sys.error, identity)
136136
}
137-
/* FIXME: zio-schema-json parses only 127 levels of nesting instead of 128
137+
138138
@Benchmark
139139
def zioSchemaJson(): NestedStructs = {
140140
import com.github.plokhotnyuk.jsoniter_scala.benchmark.ZioSchemaJsonCodecs._
141141
import java.nio.charset.StandardCharsets.UTF_8
142142

143143
nestedStructsCodec.decodeJson(new String(jsonBytes, UTF_8)).fold(sys.error, identity)
144144
}
145-
*/
146145
}

jsoniter-scala-benchmark/shared/src/main/scala-3/com/github/plokhotnyuk/jsoniter_scala/benchmark/NestedStructsReading.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,12 @@ class NestedStructsReading extends NestedStructsBenchmark {
121121

122122
new String(jsonBytes, UTF_8).fromJson[NestedStructs].fold(sys.error, identity)
123123
}
124-
/* FIXME: zio-schema-json parses only 127 levels of nesting instead of 128
124+
125125
@Benchmark
126126
def zioSchemaJson(): NestedStructs = {
127127
import com.github.plokhotnyuk.jsoniter_scala.benchmark.ZioSchemaJsonCodecs._
128128
import java.nio.charset.StandardCharsets.UTF_8
129129

130130
nestedStructsCodec.decodeJson(new String(jsonBytes, UTF_8)).fold(sys.error, identity)
131131
}
132-
*/
133132
}

jsoniter-scala-benchmark/shared/src/main/scala/com/github/plokhotnyuk/jsoniter_scala/benchmark/ZioJsonCodecs.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import scala.collection.immutable.ArraySeq
99
import scala.reflect.ClassTag
1010

1111
object ZioJsonCodecs {
12-
implicit val config: JsonCodecConfiguration = JsonCodecConfiguration(explicitEmptyCollections = false)
1312
implicit val adtC3c: JsonCodec[ADTBase] = DeriveJsonCodec.gen
1413
implicit val geoJsonC3c: JsonCodec[GeoJSON.GeoJSON] = {
1514
implicit val c1: JsonCodec[GeoJSON.SimpleGeometry] = DeriveJsonCodec.gen

0 commit comments

Comments
 (0)