feat: implement readJsonArrayAs to fix streaming issues #1071#1570
feat: implement readJsonArrayAs to fix streaming issues #1071#1570ANIKETX86 wants to merge 4 commits intozio:series/2.xfrom
Conversation
|
The CI fails on some Scala 3.x/JVM jobs because of a known Scala 3 compiler bug (assertion failed: orphan parameter reference: TypeParamRef(R)). It's not related to my code change—other jobs, including Scala 2.x and Java 17/21, all pass fine. This is documented in the Scala issue tracker, and it happens when the test suite is defined with val spec = ... instead of def spec = .... The test and the code are fine; it's just a compiler problem on some versions. Here’s an example issue: scala/scala3#19494 Please review the code—the logic and tests pass everywhere else! |
|
HI @zio team (or specific maintainer if you know one), just checking in on this PR! |
|
please review it |
Feature: Streaming JSON Array Support (#1071)
Description
This PR implements the
readJsonArrayAsAPI for thezio-jsonlibrary. This addition allows for the streaming of top-level JSON arrays directly from Files, Paths, and URLs into aZStream.Key Fixes
StackOverflowError: Refactored the decoding path to ensure non-recursive processing of large arrays.UnexpectedEnd/OneCharReaderissues: Correctly synchronized the stream delimiters ([and]) to prevent premature stream termination.Verification Results
Verified against the Statsbomb
competitions.jsondataset mentioned in #1071.zioJsonJVM/test).Bounty Information
Fixes #1071
/claim #1071
Evidence
2026-03-17.15-55-25.mp4