fuzzy-parser 0.3.0

Fuzzy JSON repair for LLM-generated DSL
Documentation
//! Error types for fuzzy parsing

use thiserror::Error;

/// Errors that can occur during fuzzy JSON repair
#[derive(Debug, Error)]
pub enum FuzzyError {
    /// JSON parsing failed
    #[error("JSON parse error: {0}")]
    JsonParse(#[from] serde_json::Error),

    /// Expected an object but got something else
    #[error("Expected JSON object, got different type")]
    NotObject,

    /// A JSON Schema document could not be converted into a repair schema
    #[error("JSON Schema import failed: {0}")]
    SchemaImport(String),
}