Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate array_to_json_array #5515

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading