alamb commented on issue #8144: URL: https://github.com/apache/arrow-rs/issues/8144#issuecomment-3191218339
> Hi [@alamb](https://github.com/alamb), I found that we already have `json_to_variant` and `variant_to_json` in `parquet_variant_json` so I guess we still need something like `batch_json_to_variant` and `batch_variant_to_json` to differentiate between them. Batch may not a good prefix tho, do you have any suggestions? Since I expect the batch version (that operates on arrays to be more common) how about adding a `_value` suffix to the existing ones and then taking the `variant_to_json` and `json_to_variant` names? * `json_to_variant` --> `json_to_variant_value` * variant_to_json --> variant_to_json_value Another thing we could do is add an extension trait like this instead of `json_to_variant` and `variant_to_json` 🤔 ```rust pub trait VariantToJson { fn to_json(&self) -> Json::Value; fn from_json(value: Json::Value) --> Self; } ``` -- 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 For queries about this service, please contact Infrastructure at: us...@infra.apache.org