Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Simplified API for writing to JSON #864

Merged
merged 1 commit into from
Feb 25, 2022
Merged

Simplified API for writing to JSON #864

merged 1 commit into from
Feb 25, 2022

Conversation

jorgecarleitao
Copy link
Owner

This PR privatizes the JsonFormat trait and replaces it by a simple enum.

The trait is an implementation detail of this crate - the relevant aspect is that the user can choose between JSON and NDJSON, which can be achieved by a simple enum.

Backward incompatible changes

To migrate

  • replace arrow2::io::json::write::JsonArray::default() by arrow2::io::json::write::Format::Json
  • replace arrow2::io::json::write::LineDelimited::default() by arrow2::io::json::write::NewlineDelimitedJson

@codecov
Copy link

codecov bot commented Feb 25, 2022

Codecov Report

Merging #864 (4b2dff6) into main (10e6cd5) will increase coverage by 0.00%.
The diff coverage is 91.66%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #864   +/-   ##
=======================================
  Coverage   71.56%   71.57%           
=======================================
  Files         335      335           
  Lines       17952    17961    +9     
=======================================
+ Hits        12847    12855    +8     
- Misses       5105     5106    +1     
Impacted Files Coverage Δ
src/io/json/write/serialize.rs 86.11% <83.33%> (-0.22%) ⬇️
src/io/json/write/mod.rs 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 10e6cd5...4b2dff6. Read the comment docs.

@jorgecarleitao jorgecarleitao merged commit f7439bb into main Feb 25, 2022
@jorgecarleitao jorgecarleitao deleted the simpler_json branch February 25, 2022 19:29
sydduckworth pushed a commit to mindx/arrow2 that referenced this pull request Mar 2, 2022
sydduckworth pushed a commit to mindx/arrow2 that referenced this pull request Mar 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant