Skip to content

Commit fb71a82

Browse files
committedMar 17, 2025·
Update zio-schema to 1.6.6
1 parent 6b4ee91 commit fb71a82

File tree

5 files changed

+9
-15
lines changed

5 files changed

+9
-15
lines changed
 

‎build.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ lazy val `jsoniter-scala-benchmark` = crossProject(JVMPlatform, JSPlatform)
244244
"com.evolutiongaming" %%% "play-json-jsoniter" % "0.10.3" intransitive(),
245245
"org.playframework" %%% "play-json" % "3.0.4",
246246
"dev.zio" %%% "zio-json" % "0.7.39",
247-
"dev.zio" %%% "zio-schema-json" % "1.6.5",
247+
"dev.zio" %%% "zio-schema-json" % "1.6.6",
248248
"io.circe" %%% "circe-generic" % "0.14.12",
249249
"io.circe" %%% "circe-jawn" % "0.14.12",
250250
"com.lihaoyi" %%% "upickle" % "4.1.0",

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

+2-3
Original file line numberDiff line numberDiff line change
@@ -1019,9 +1019,8 @@ object Main {
10191019
B("playJsonJsoniter")(benchmark.playJsonJsoniter()),
10201020
B("smithy4sJson")(benchmark.smithy4sJson()),
10211021
B("uPickle")(benchmark.uPickle()),
1022-
B("zioJson")(benchmark.zioJson())
1023-
//FIXME: zio-schema-json throws java.lang.RuntimeException: .type.FeatureCollection.features[0].type.Feature.geometry.type.Polygon(unrecognized subtype)
1024-
//B("zioSchemaJson")(benchmark.zioSchemaJson())
1022+
B("zioJson")(benchmark.zioJson()),
1023+
B("zioSchemaJson")(benchmark.zioSchemaJson())
10251024
))
10261025
}, {
10271026
val benchmark = new GeoJSONWriting { setup() }

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

+2-4
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ class GeoJSONReadingSpec 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 throws java.lang.RuntimeException: .type.FeatureCollection.features[0].type.Feature.geometry.type.Polygon(unrecognized subtype)
23-
//benchmark.zioSchemaJson() shouldBe benchmark.obj
22+
benchmark.zioSchemaJson() shouldBe benchmark.obj
2423
}
2524
"fail on invalid input" in {
2625
val b = benchmark
@@ -35,8 +34,7 @@ class GeoJSONReadingSpec extends BenchmarkSpecBase {
3534
intercept[Throwable](b.smithy4sJson())
3635
intercept[Throwable](b.uPickle())
3736
intercept[Throwable](b.zioJson())
38-
//FIXME: zio-schema-json throws java.lang.RuntimeException: .type.FeatureCollection.features[0].type.Feature.geometry.type.Polygon(unrecognized subtype)
39-
//intercept[Throwable](b.zioSchemaJson())
37+
intercept[Throwable](b.zioSchemaJson())
4038
}
4139
}
4240
}

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

+2-4
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ class GeoJSONReadingSpec 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 throws java.lang.RuntimeException: .type.FeatureCollection.features[0].type.Feature.geometry.type.Polygon(unrecognized subtype)
28-
//benchmark.zioSchemaJson() shouldBe benchmark.obj
27+
benchmark.zioSchemaJson() shouldBe benchmark.obj
2928
}
3029
"fail on invalid input" in {
3130
val b = benchmark
@@ -45,8 +44,7 @@ class GeoJSONReadingSpec extends BenchmarkSpecBase {
4544
intercept[Throwable](b.uPickle())
4645
intercept[Throwable](b.weePickle())
4746
intercept[Throwable](b.zioJson())
48-
//FIXME: zio-schema-json throws java.lang.RuntimeException: .type.FeatureCollection.features[0].type.Feature.geometry.type.Polygon(unrecognized subtype)
49-
//intercept[Throwable](b.zioSchemaJson())
47+
intercept[Throwable](b.zioSchemaJson())
5048
}
5149
}
5250
}

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

+2-3
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,12 @@ class GeoJSONReading extends GeoJSONBenchmark {
127127

128128
new String(jsonBytes, UTF_8).fromJson[GeoJSON].fold(sys.error, identity)
129129
}
130-
/* FIXME: zio-schema-json throws java.lang.RuntimeException: .type.FeatureCollection.features[0].type.Feature.geometry.type.Polygon(unrecognized subtype)
130+
131131
@Benchmark
132132
def zioSchemaJson(): GeoJSON = {
133133
import com.github.plokhotnyuk.jsoniter_scala.benchmark.ZioSchemaJsonCodecs._
134134
import java.nio.charset.StandardCharsets.UTF_8
135135

136-
geoJSONCodec.decodeJson(new String(jsonBytes, UTF_8)).fold(sys.error, identity)
136+
geoJsonCodec.decodeJson(new String(jsonBytes, UTF_8)).fold(sys.error, identity)
137137
}
138-
*/
139138
}

0 commit comments

Comments
 (0)
Please sign in to comment.