pub fn inspect_json_from_text(
raw: &str,
file_size: u64,
sample_rows: usize,
) -> Result<InspectReport, McpError>Expand description
Inspect a JSON / JSONL text string (already in memory) without
reading from a file. Used by the inspect_file handler when
json_extract_path has already extracted the relevant slice.
Public so crate::server can call it after extract_json_path.
§Errors
- Propagates errors from
normalize_json_or_jsonl(malformed JSONL) andinfer_json_schema(schema inference failure). - Returns
ErrorCode::SchemaMismatchif the normalized array cannot be re-parsed as JSON for stats collection.