[Feature Request]: Implement JsonIO.read() / readRows() for the Java SDK
I maintainer di solito rispondono entro 1 giorno
@nitinware ci sta già lavorando.
Dal 9/9/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
What would you like to happen?
Motivation
The Java JsonIO connector (sdks/java/io/json/.../JsonIO.java) currently supports only writing withJsonIO.write() and JsonIO.writeRows(). There is no read path. The connector's own class Javadoc acknowledges this gap:
"Reading from JSON files is not yet implemented in Java. Please see
https://github.com/apache/beam/issues/24552."
That linked issue (#24552) is actually titled "Implement CsvIO.Read" and is closed as not planned, CsvIO.Read was subsequently implemented under a different path, so there is currently no live tracking issue for JSON reading, and the Javadoc reference is stale. This issue is intended to be that tracking issue.
Proposal
Add a read/parse surface to JsonIO symmetric to the existing write surface
and mirroring the pattern CsvIO already established:
JsonIO.parse(Class<T> klass) // JSON records -> user type T
JsonIO.parseRows(Schema schema) // JSON records -> Row
modeled on CsvIO.parse(Class, CSVFormat) (CsvIO.java:419) and CsvIO.parseRows(Schema, CSVFormat) (CsvIO.java:497), including their CsvIOParse result-and-error-handling pattern.
Why this is tractable
The core JSON→Row conversion already exists and is reusable:
- JsonUtils.getJsonStringToRowFunction(Schema)
(sdks/java/core/.../schemas/utils/JsonUtils.java:104) - JsonUtils.getJsonBytesToRowFunction(Schema) (line 93)
- JsonUtils.beamSchemaFromJsonSchema(String) (line 201)
The work is primarily wiring these into a read PTransform over FileIO.match() + line reading, following the CsvIO parse structure not new parsing logic.
Testing plan
- Unit tests mirroring CsvIO parse tests: schema validation, type conversion to both Row and custom user classes, error/failure routing.
- Round-trip test: write JSON via JsonIO.write(), read it back via JsonIO.parseRows(), assert equality.
- No new dependencies- JSON schema/parse machinery is already in sdks/java/core.
Issue Priority
Priority: 2 (default / most feature requests should be filed as P2)
Issue Components
- Component: Python SDK
- Component: Java SDK
- Component: Go SDK
- Component: Typescript SDK
- Component: IO connector
- Component: Beam YAML
- Component: Beam examples
- Component: Beam playground
- Component: Beam katas
- Component: Website
- Component: Infrastructure
- Component: Spark Runner
- Component: Flink Runner
- Component: Prism Runner
- Component: Twister2 Runner
- Component: Hazelcast Jet Runner
- Component: Google Cloud Dataflow Runner
- Lingua principale
- Java
- Stelle
- 8.7k
- Fork
- 4.7k
- Merge medio
- 2g 4h
- PR unite (30g)
- 278
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/beam
-
[Feature Request]: Support Protobuf 7.x in Python SDKForse già presa @sofiathoren l’ha presa 5 giorni fa. ApertaP2 python
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Row.toString throws for an ITERABLE field that is not backed by a ListForse già presa @PDGGK l’ha presa 66 giorni fa. Apertajava P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
apache/beam#39624 · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: PubsubIO used in batch incorrect batch cutoff sizeForse già presa @1fanwang l’ha presa 55 giorni fa. Apertabug io P3 pinned pubsub
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/beam#28011 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
build P3 sub-task
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
bug follow-up lane:backlog
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Sanne/incus-spawn#1576 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
checkstyle/checkstyle#22069 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
it-at-m/eNoVa-Editor#79 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno