This is an automated email from the ASF dual-hosted git repository.

tustvold pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git


The following commit(s) were added to refs/heads/master by this push:
     new 4d0316da100 Deprecate array_to_json_array (#5515)
4d0316da100 is described below

commit 4d0316da100b20363fc68360b7fdb8bfd88f1ee7
Author: Raphael Taylor-Davies <[email protected]>
AuthorDate: Fri Mar 15 15:44:09 2024 +1300

    Deprecate array_to_json_array (#5515)
---
 arrow-json/src/writer.rs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arrow-json/src/writer.rs b/arrow-json/src/writer.rs
index d8045c33048..9f63b811d74 100644
--- a/arrow-json/src/writer.rs
+++ b/arrow-json/src/writer.rs
@@ -161,6 +161,7 @@ fn struct_array_to_jsonmap_array(
 }
 
 /// Converts an arrow [`Array`] into a `Vec` of Serde JSON 
[`serde_json::Value`]'s
+#[deprecated(note = "Use Writer")]
 pub fn array_to_json_array(array: &dyn Array) -> Result<Vec<Value>, 
ArrowError> {
     // For backwards compatibility, default to skip nulls
     array_to_json_array_internal(array, false)
@@ -1837,6 +1838,7 @@ mod tests {
     }
 
     #[test]
+    #[allow(deprecated)]
     fn test_array_to_json_array_for_fixed_size_list_array() {
         let expected_json = vec![
             json!([0, 1, 2]),
@@ -1859,6 +1861,7 @@ mod tests {
     }
 
     #[test]
+    #[allow(deprecated)]
     fn test_array_to_json_array_for_map_array() {
         let expected_json = serde_json::from_value::<Vec<Value>>(json!([
             [

Reply via email to