Skip to content

Add hooks to json encoder to override default encoding or add support for unsupported types#7015

Merged
alamb merged 20 commits intoapache:mainfrom
adriangb:arrow-union
Mar 25, 2025
Merged

Add hooks to json encoder to override default encoding or add support for unsupported types#7015
alamb merged 20 commits intoapache:mainfrom
adriangb:arrow-union

Conversation

@adriangb
Copy link
Copy Markdown
Contributor

We essentially had to vendor this module to implement this. I know this has been discussed in the past and there was pushback against exposing Encoder to the public API but since I had to go through the work of updating our vendored version I thought I'd at least try to make a PR to upstream this to make our lives easier in the future and bring value back to the community.

In my opinion exposing this is a rather small adition the public API and any breaking changes in the future will be restricted to the JSON encoder, which is not a core part of the project. It seems worth it and addresses various requests e.g. how to encode a binary array (base64 encoded string or array of ints are both common). It has also been a stable API for ~ 1 year now.

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

Labels

api-change Changes to the arrow API arrow Changes to the arrow crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants