Skip to content

Conversation

@stenlarsson
Copy link
Contributor

@stenlarsson stenlarsson commented Jan 10, 2026

Rationale for this change

Arrow currently supports JSON reading in C++, but it currently lacks an equivalent JSON writer. This means users are suffer marshalling overhead when writing JSON through languages such as Python.

What changes are included in this PR?

This implements a writer for line-delimited JSON, and the API is based on the CSV writer.

It is implemented using the RowBatchBuilder from the cpp/examples/arrow/rapidjson_row_converter.cc example, with some improvements:

  1. Date and time types are supported and written as numbers.
  2. Optionally emits nulls.

There are no bindings for other languages implemented yet.

Are these changes tested?

Yes, with C++ unit tests.

There are also a few benchmarks based on the CSV writer benchmarks.

Are there any user-facing changes?

Yes, a new JSON writer API.

@github-actions
Copy link

⚠️ GitHub issue #47173 has been automatically assigned in GitHub to PR creator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant