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 7107211b9..0a885faa7 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 @@ -137,7 +137,7 @@ object JsonCodec { if (valueEnded && depth == 0) { val str = stringBuilder.result() - if (!str.isBlank) chunkBuilder += str + if (!str.forall(_.isWhitespace)) chunkBuilder += str stringBuilder.clear() } }