Skip to content

Document how to customize JSON encoding via EncoderFactory - #10741

Merged
alamb merged 2 commits into
apache:mainfrom
alamb:alamb/json_encoder_docs
Aug 21, 2026
Merged

Document how to customize JSON encoding via EncoderFactory#10741
alamb merged 2 commits into
apache:mainfrom
alamb:alamb/json_encoder_docs

Conversation

@alamb

@alamb alamb commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

N/A -- documentation only.

Rationale for this change

The ability to customize JSON encoding via EncoderFactory was added in #7015, but neither the crate-level docs nor the writer module docs mention it, so users only find the hook by stumbling on WriterBuilder::with_encoder_factory.

What changes are included in this PR?

Documentation only, no code changes:

  • Crate-level docs: list a custom EncoderFactory as an alternative for binary data encoding
  • Misc other wording fixeers

It would be nice to add a matching pointer for customizing decoding as part of #10670

Are these changes tested?

Covered by existing doc tests and CI rustdoc link checking.

Are there any user-facing changes?

Documentation only.

@github-actions github-actions Bot added arrow Changes to the arrow crate arrow-json labels Aug 18, 2026
@alamb
alamb marked this pull request as ready for review August 18, 2026 18:29
@alamb alamb added the documentation Improvements or additions to documentation label Aug 18, 2026
/// This trait allows customizing JSON encoding for specific data types,
/// or adding new encoders for unsupported or custom data types.
///
/// You can register an implementation of this trait using

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am trying to point people / agents to the right APIs

//! );
//! ```
//!
//! ## Customizing the encoder

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the core change -- add a note at the top level that says you can customize the encoder

Comment thread arrow-json/src/lib.rs
//!
//! [Customizing the encoder]: writer#customizing-the-encoder
//!
//! ## `Base64` Encoding Example

@alamb alamb Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should consider removing the entire Base64 example here as it would be better to simply use the encoding factory I think, rather than copying the input initially

@alamb
alamb merged commit c837ee8 into apache:main Aug 21, 2026
31 checks passed
@alamb

alamb commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

Thank you @Jefffrey

Rich-T-kid pushed a commit to Rich-T-kid/arrow-rs that referenced this pull request Aug 26, 2026
…10741)

# Which issue does this PR close?

N/A -- documentation only.

# Rationale for this change

The ability to customize JSON encoding via [`EncoderFactory`] was added
in apache#7015, but neither the crate-level docs nor the writer module docs
mention it, so users only find the hook by stumbling on
`WriterBuilder::with_encoder_factory`.

[`EncoderFactory`]:
https://docs.rs/arrow-json/latest/arrow_json/trait.EncoderFactory.html

# What changes are included in this PR?

Documentation only, no code changes:
- Crate-level docs: list a custom `EncoderFactory` as an alternative for
binary data encoding
- Misc other wording fixeers

It would be nice to add a matching pointer for customizing *decoding* as
part of apache#10670

# Are these changes tested?

Covered by existing doc tests and CI rustdoc link checking.

# Are there any user-facing changes?

Documentation only.
Rich-T-kid pushed a commit to Rich-T-kid/arrow-rs that referenced this pull request Aug 28, 2026
…10741)

# Which issue does this PR close?

N/A -- documentation only.

# Rationale for this change

The ability to customize JSON encoding via [`EncoderFactory`] was added
in apache#7015, but neither the crate-level docs nor the writer module docs
mention it, so users only find the hook by stumbling on
`WriterBuilder::with_encoder_factory`.

[`EncoderFactory`]:
https://docs.rs/arrow-json/latest/arrow_json/trait.EncoderFactory.html

# What changes are included in this PR?

Documentation only, no code changes:
- Crate-level docs: list a custom `EncoderFactory` as an alternative for
binary data encoding
- Misc other wording fixeers

It would be nice to add a matching pointer for customizing *decoding* as
part of apache#10670

# Are these changes tested?

Covered by existing doc tests and CI rustdoc link checking.

# Are there any user-facing changes?

Documentation only.
Rich-T-kid pushed a commit to Rich-T-kid/arrow-rs that referenced this pull request Sep 2, 2026
…10741)

# Which issue does this PR close?

N/A -- documentation only.

# Rationale for this change

The ability to customize JSON encoding via [`EncoderFactory`] was added
in apache#7015, but neither the crate-level docs nor the writer module docs
mention it, so users only find the hook by stumbling on
`WriterBuilder::with_encoder_factory`.

[`EncoderFactory`]:
https://docs.rs/arrow-json/latest/arrow_json/trait.EncoderFactory.html

# What changes are included in this PR?

Documentation only, no code changes:
- Crate-level docs: list a custom `EncoderFactory` as an alternative for
binary data encoding
- Misc other wording fixeers

It would be nice to add a matching pointer for customizing *decoding* as
part of apache#10670

# Are these changes tested?

Covered by existing doc tests and CI rustdoc link checking.

# Are there any user-facing changes?

Documentation only.
alamb added a commit to alamb/arrow-rs that referenced this pull request Sep 2, 2026
Adds crate-level and reader-module doc pointers to the `DecoderFactory`
extension point added in apache#10670, mirroring the encoder documentation
added in apache#10741.
alamb added a commit to alamb/arrow-rs that referenced this pull request Sep 2, 2026
Adds crate-level and reader-module doc pointers to the `DecoderFactory`
extension point added in apache#10670, mirroring the encoder documentation
added in apache#10741.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrow Changes to the arrow crate arrow-json documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants