Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
guersam committed Jul 4, 2024
1 parent 116b786 commit 71f4ee5
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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() }
Expand Down

0 comments on commit 71f4ee5

Please sign in to comment.