Parsing & validation
The tool trims the input first. Empty or whitespace-only input is treated as “no data” rather than an error. Real JSON is parsed using JSON.parse wrapped in a diagnostic layer that produces more helpful error messages and approximate line/column information.