Module arrow::json::reader [−][src]
Expand description
JSON Reader
This JSON reader allows JSON line-delimited files to be read into the Arrow memory model. Records are loaded in batches and are then converted from row-based data to columnar data.
Example:
use arrow::datatypes::{DataType, Field, Schema}; use arrow::json; use std::fs::File; use std::io::BufReader; use std::sync::Arc; let schema = Schema::new(vec![ Field::new("a", DataType::Float64, false), Field::new("b", DataType::Float64, false), Field::new("c", DataType::Float64, false), ]); let file = File::open("test/data/basic.json").unwrap(); let mut json = json::Reader::new(BufReader::new(file), Arc::new(schema), 1024, None); let batch = json.next().unwrap().unwrap();
Structs
JSON values to Arrow record batch decoder. Decoder’s next_batch method takes a JSON Value iterator as input and outputs Arrow record batch.
JSON file reader
JSON file reader builder
JSON file reader that produces a serde_json::Value iterator from a Read trait
Functions
Infer the fields of a JSON file by reading the first n records of the buffer, with
max_read_records
controlling the maximum number of records to read.
Infer the fields of a JSON file by reading all items from the JSON Value Iterator.
Infer the fields of a JSON file by reading the first n records of the file, with
max_read_records
controlling the maximum number of records to read.