use thiserror::Error;
#[derive(Error, Debug)]
pub enum JsonError {
#[error("Failed to serialize object to JSON: {0}")]
Serialization(String),
#[error("Failed to deserialize JSON to object: {0}")]
Deserialization(String),
#[error("Failed to store JSON data: {0}")]
Storage(String),
#[error("Failed to retrieve JSON data: {0}")]
Retrieval(String),
#[error("Invalid codec - expected JSON codec (0x0200), got {actual:#x}")]
InvalidCodec { expected: u64, actual: u64 },
}