[Feature Request]: Implement JsonIO.read() / readRows() for the Java SDK
Maintainer thường phản hồi trong vòng 1 ngày
@nitinware đang làm issue này rồi.
Từ ngày 9/9/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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
- Ngôn ngữ chính
- Java
- Star
- 8.7k
- Fork
- 4.7k
- Merge trung bình
- 2 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 296
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/beam
-
[Feature Request]: Support Protobuf 7.x in Python SDKCó thể đã có người làm @sofiathoren đã nhận 6 ngày trước. Đang mởP2 python
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Row.toString throws for an ITERABLE field that is not backed by a ListCó thể đã có người làm @PDGGK đã nhận 67 ngày trước. Đang mởjava P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
apache/beam#39624 · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: PubsubIO used in batch incorrect batch cutoff sizeCó thể đã có người làm @1fanwang đã nhận 56 ngày trước. Đang mởbug io P3 pinned pubsub
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/beam#28011 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
build P3 sub-task
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
QuiltMC/update-quilt-meta#28 ·
-
awaiting triage Documentation P3
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area/build area/maintainability component/camunda-process-test kind/tech-debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Kafka: Filter empty strings and whitespace in IcebergSinkConfig stringToListCó thể đã có người làm @mohamed-elbrik đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area/kotlin
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày