Skip to main content

infer_schema_from_json_with_path

Function infer_schema_from_json_with_path 

Source
pub fn infer_schema_from_json_with_path(
    sample: &[u8],
    json_path: Option<&[String]>,
) -> Result<SchemaRef, ConnectorError>
Expand description

Like infer_schema_from_json but navigates a json.path first.

ยงErrors

Returns ConnectorError::Serde if the sample is not valid UTF-8 or valid JSON, if a path segment is not found, or if the target is not a JSON object.