Skip to content

Commit 4d0316d

Browse files
authored
Deprecate array_to_json_array (#5515)
1 parent c3899ce commit 4d0316d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arrow-json/src/writer.rs

+3
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ fn struct_array_to_jsonmap_array(
161161
}
162162

163163
/// Converts an arrow [`Array`] into a `Vec` of Serde JSON [`serde_json::Value`]'s
164+
#[deprecated(note = "Use Writer")]
164165
pub fn array_to_json_array(array: &dyn Array) -> Result<Vec<Value>, ArrowError> {
165166
// For backwards compatibility, default to skip nulls
166167
array_to_json_array_internal(array, false)
@@ -1837,6 +1838,7 @@ mod tests {
18371838
}
18381839

18391840
#[test]
1841+
#[allow(deprecated)]
18401842
fn test_array_to_json_array_for_fixed_size_list_array() {
18411843
let expected_json = vec![
18421844
json!([0, 1, 2]),
@@ -1859,6 +1861,7 @@ mod tests {
18591861
}
18601862

18611863
#[test]
1864+
#[allow(deprecated)]
18621865
fn test_array_to_json_array_for_map_array() {
18631866
let expected_json = serde_json::from_value::<Vec<Value>>(json!([
18641867
[

0 commit comments

Comments
 (0)