From 71f4ee5419e0ad00a58d3e7b76c27660623590ae Mon Sep 17 00:00:00 2001 From: Jisoo Park Date: Thu, 4 Jul 2024 12:56:08 +0900 Subject: [PATCH] fmt --- .../shared/src/main/scala/zio/schema/codec/JsonCodec.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zio-schema-json/shared/src/main/scala/zio/schema/codec/JsonCodec.scala b/zio-schema-json/shared/src/main/scala/zio/schema/codec/JsonCodec.scala index f81e15630..861f6f23d 100644 --- a/zio-schema-json/shared/src/main/scala/zio/schema/codec/JsonCodec.scala +++ b/zio-schema-json/shared/src/main/scala/zio/schema/codec/JsonCodec.scala @@ -992,6 +992,7 @@ object JsonCodec { private[codec] def caseClass0Decoder[Z](discriminator: Int, schema: Schema.CaseClass0[Z]): ZJsonDecoder[Z] = { (trace: List[JsonError], in: RetractReader) => val rejectExtraFields = schema.annotations.collectFirst({ case _: rejectExtraFields => () }).isDefined + var i = 0 def skipField(): Unit = { if (rejectExtraFields) { @@ -1007,7 +1008,9 @@ object JsonCodec { if (discriminator == -2) { while (Lexer.nextField(trace, in)) { skipField() } } else { - if (discriminator == -1) { Lexer.char(trace, in, '{') } + if (discriminator == -1) { + Lexer.char(trace, in, '{') + } if (Lexer.firstField(trace, in)) { skipField() while (Lexer.nextField(trace, in)) { skipField() }