Module arrow::json::reader [−][src]
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
Decoder | JSON values to Arrow record batch decoder. Decoder’s next_batch method takes a JSON Value iterator as input and outputs Arrow record batch. |
Reader | JSON file reader |
ReaderBuilder | JSON file reader builder |
ValueIter | JSON file reader that produces a serde_json::Value iterator from a Read trait |
Functions
infer_json_schema | Infer the fields of a JSON file by reading the first n records of the buffer, with
|
infer_json_schema_from_iterator | Infer the fields of a JSON file by reading all items from the JSON Value Iterator. |
infer_json_schema_from_seekable | Infer the fields of a JSON file by reading the first n records of the file, with
|