alamb opened a new issue, #7426: URL: https://github.com/apache/arrow-rs/issues/7426
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.** - Part of https://github.com/apache/arrow-rs/issues/6736 - Depends on https://github.com/apache/arrow-rs/issues/7423 A major use case for Variant values in Parquet and Arrow is efficiently processing JSON encoded data. Thus, an important capability is being able to very efficiently **write** `Variant` binary values (described in XXX and in [VariantEncoding.md]) to JSON. This ticket covers an API to convert a single Variant to JSON. Other tickets will cover converting multiple `Variant` values to JSON as well as converting to/from Arrow Utf8* arrays and `Variant` arrays as well as writing this to/from parquet. [VariantEncoding.md]: https://github.com/apache/parquet-format/blob/master/VariantEncoding.md **Describe the solution you'd like** I would like an API to write a variant to json **Describe alternatives you've considered** I suggest an API like this: ```rust // Use API from XXX to read variant values let metadata: &[u8] = ...; let value: &[u8] = ...; let variant = Variant::try_new(metadata, value); // Location for writing json bytes // Should be anything that implements std::io::Write or some other trait let mut json_buffer = vec![]; // Convert the variant value to JSON variant_to_json(&mut json_buffer, variant)?; // json_buffer now contains json encoded values ``` **Additional context** <!-- Add any other context or screenshots about the feature request here. --> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org