pub struct JsonOptions {
pub compression: CompressionTypeVariant,
pub compression_level: Option<u32>,
pub schema_infer_max_rec: Option<usize>,
pub newline_delimited: bool,
}Expand description
Options controlling JSON format
Fields§
§compression: CompressionTypeVariant§compression_level: Option<u32>Compression level for the output file. The valid range depends on the compression algorithm:
- ZSTD: 1 to 22 (default: 3)
- GZIP: 0 to 9 (default: 6)
- BZIP2: 0 to 9 (default: 6)
- XZ: 0 to 9 (default: 6) If not specified, the default level for the compression algorithm is used.
schema_infer_max_rec: Option<usize>§newline_delimited: boolThe JSON format to use when reading files.
When true (default), expects newline-delimited JSON (NDJSON):
{"key1": 1, "key2": "val"}
{"key1": 2, "key2": "vals"}When false, expects JSON array format:
[
{"key1": 1, "key2": "val"},
{"key1": 2, "key2": "vals"}
]Trait Implementations§
Source§impl Clone for JsonOptions
impl Clone for JsonOptions
Source§fn clone(&self) -> JsonOptions
fn clone(&self) -> JsonOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ConfigField for JsonOptions
impl ConfigField for JsonOptions
Source§impl Debug for JsonOptions
impl Debug for JsonOptions
Source§impl Default for JsonOptions
impl Default for JsonOptions
Source§impl PartialEq for JsonOptions
impl PartialEq for JsonOptions
Source§fn eq(&self, other: &JsonOptions) -> bool
fn eq(&self, other: &JsonOptions) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for JsonOptions
Source§impl TryFrom<&JsonOptions> for JsonWriterOptions
impl TryFrom<&JsonOptions> for JsonWriterOptions
Source§type Error = DataFusionError
type Error = DataFusionError
The type returned in the event of a conversion error.
Source§fn try_from(value: &JsonOptions) -> Result<Self>
fn try_from(value: &JsonOptions) -> Result<Self>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for JsonOptions
impl RefUnwindSafe for JsonOptions
impl Send for JsonOptions
impl Sync for JsonOptions
impl Unpin for JsonOptions
impl UnsafeUnpin for JsonOptions
impl UnwindSafe for JsonOptions
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more