pub struct JsonStats {
pub is_array: bool,
pub array_length: Option<usize>,
pub top_level_keys: Vec<String>,
pub nested_depth: usize,
pub unique_values_sample: HashMap<String, Vec<String>>,
pub cardinality_estimates: HashMap<String, usize>,
pub preview: String,
}Expand description
Statistics for JSON files
Fields§
§is_array: boolWhether the root is an array
array_length: Option<usize>Length if it’s an array
top_level_keys: Vec<String>Top-level keys (for objects) or sample element keys (for arrays)
nested_depth: usizeMaximum nesting depth
unique_values_sample: HashMap<String, Vec<String>>Sample of unique values for interesting fields (max 5 values each)
cardinality_estimates: HashMap<String, usize>Estimated cardinality for fields with many unique values
preview: StringPreview of first few elements/properties (as JSON string)
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for JsonStats
impl<'de> Deserialize<'de> for JsonStats
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for JsonStats
impl JsonSchema for JsonStats
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for JsonStats
Auto Trait Implementations§
impl Freeze for JsonStats
impl RefUnwindSafe for JsonStats
impl Send for JsonStats
impl Sync for JsonStats
impl Unpin for JsonStats
impl UnsafeUnpin for JsonStats
impl UnwindSafe for JsonStats
Blanket Implementations§
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