Skip to content

Commit

Permalink
allowMissingValueDecoder defaults to true for out-of-scope decoders
Browse files Browse the repository at this point in the history
  • Loading branch information
ThijsBroersen committed Feb 4, 2025
1 parent 4caf392 commit 68d866e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion zio-json/shared/src/main/scala-2.x/zio/json/macros.scala
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ object DeriveJsonDecoder {
case _: OptionJsonDecoder[_] => true
case _: CollectionJsonDecoder[_] => !explicitEmptyCollections
case d: MappedJsonDecoder[_] => allowMissingValueDecoder(d.underlying)
case _ => false
case _ => true
}

override def unsafeDecodeMissing(trace: List[JsonError]): A = {
Expand Down
2 changes: 1 addition & 1 deletion zio-json/shared/src/main/scala-3/zio/json/macros.scala
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ sealed class JsonDecoderDerivation(config: JsonCodecConfiguration) extends Deriv
case _: OptionJsonDecoder[_] => true
case _: CollectionJsonDecoder[_] => !explicitEmptyCollections
case d: MappedJsonDecoder[_] => allowMissingValueDecoder(d.underlying)
case _ => false
case _ => true
}

override def unsafeDecodeMissing(trace: List[JsonError]): A = {
Expand Down

0 comments on commit 68d866e

Please sign in to comment.