Struct polars_io::json::JsonReader
source · pub struct JsonReader<R>where
R: MmapBytesReader,{ /* private fields */ }
Available on crate feature
json
only.Implementations§
source§impl<R> JsonReader<R>where
R: MmapBytesReader,
impl<R> JsonReader<R>where
R: MmapBytesReader,
sourcepub fn with_schema(self, schema: &Schema) -> Self
pub fn with_schema(self, schema: &Schema) -> Self
Set the JSON file’s schema
sourcepub fn infer_schema_len(self, max_records: Option<usize>) -> Self
pub fn infer_schema_len(self, max_records: Option<usize>) -> Self
Set the JSON reader to infer the schema of the file
sourcepub fn with_batch_size(self, batch_size: usize) -> Self
pub fn with_batch_size(self, batch_size: usize) -> Self
Set the batch size (number of records to load at one time) This heavily influences loading time.
sourcepub fn with_projection(self, projection: Option<Vec<String>>) -> Self
pub fn with_projection(self, projection: Option<Vec<String>>) -> Self
Set the reader’s column projection