How liemle3893/csv2json works
• Input → Processing → Output
• [CSV Files] → [Config] → [Parser] → [Converter] → [JSON Output]
Component Details
a. Input Section:
• CSV source files
• HCL configuration file
• Config Parser: Reads HCL configuration
• Directory Handler: Manages file traversal
• CSV Parser: Reads and validates CSV content
• Type Converter: Transforms data types
• JSON Generator: Creates JSON structure
c. Output Section:
• JSON files
• Directory-based processing
• Column type conversion
• Path mapping for JSON structure
• Exclusion/Inclusion patterns
• Custom separators
• Default values
• Additional columns
• Parser package: CSV parsing logic
• Converter package: Type conversion
• JSON package: JSON generation
• Util package: File operations
• Config package: Configuration management
[Input Section] → [Processing Section] → [Output Section]
• ↓ ↓ ↓
[CSV Files] [Configuration Layer] [JSON Files]
[Config.hcl] → [Parser Layer] → [Structured]
• [Converter Layer] [Output]
• [JSON Generator]
Configuration validation flow
This design should capture both the high-level architecture and the important implementation details without becoming too cluttered. The focus should be on showing how the tool processes files through its pipeline while maintaining configurability and extensibility.