Skip to content

Commit

Permalink
Deprecate array_to_json_array (#5515)
Browse files Browse the repository at this point in the history
  • Loading branch information
tustvold authored Mar 15, 2024
1 parent c3899ce commit 4d0316d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arrow-json/src/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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]),
Expand All @@ -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!([
[
Expand Down

0 comments on commit 4d0316d

Please sign in to comment.