Hi Beam Community,

The Java JsonIO connector (sdks/java/io/json) is currently write-only, it
exposes JsonIO.write() and writeRows(), but has no corresponding read path.
The connector's class Javadoc also notes that reading from JSON files is
not yet implemented.

I'd like to close this gap by adding a read/parse API symmetric to the
existing writer:

JsonIO.parse(Class<T> klass)      // JSON records -> user type T
JsonIO.parseRows(Schema schema)   // JSON records -> Row

Proposed approach:

   - Mirror the existing CsvIO.parse() / parseRows() pattern, including its
   CsvIOParse result-and-error-handling structure.
   - Reuse the JSON->Row functions already in core (
   JsonUtils.getJsonStringToRowFunction, beamSchemaFromJsonSchema),
   avoiding new parsing logic or dependencies.
   - Add unit tests covering schema/type conversion and error handling,
   plus a write/read round-trip test using the DirectRunner.

Tracking issue: https://github.com/apache/beam/issues/40086

I'd appreciate feedback on the proposed API shape and implementation
approach before I start working on it.

Thanks,
Nitin Ware

Reply via email to