Expand description
Legacy Format Converters
This module provides converters for JSON, YAML, and TOML formats via DX Serializer to maintain backward compatibility with existing configurations.
§Supported Formats
- JSON: Standard JSON configuration files
- YAML: YAML configuration files (common in many tools)
- TOML: TOML configuration files (Rust ecosystem standard)
§Usage
ⓘ
use driven::dx_integration::legacy::{LegacyFormat, LegacyConverter};
use driven::DrivenConfig;
// Convert from JSON
let json_content = r#"{"version": "1.0", "default_editor": "cursor"}"#;
let config = LegacyConverter::from_json::<DrivenConfig>(json_content)?;
// Convert to JSON
let json_output = LegacyConverter::to_json(&config)?;
// Auto-detect format and convert
let config = LegacyConverter::from_auto::<DrivenConfig>(content, "config.yaml")?;Structs§
- Legacy
Converter - Legacy format converter
Enums§
- Legacy
Format - Supported legacy formats
Traits§
- Legacy
Serializable - Trait for types that can be converted from legacy formats