geopfa.io.data_readers.safe_json_load¶
- safe_json_load(path)[source]¶
Load a JSON configuration file with support for comments and relaxed syntax.
This function uses json5 parsing, allowing: - Single-line comments (//, #) - Trailing commas - More flexible formatting than strict JSON
- Parameters:
path (str or pathlib.Path) – Path to the JSON configuration file.
- Returns:
dict – Parsed JSON object.
- Raises:
FileNotFoundError – If the file does not exist.
ValueError – If the file cannot be parsed.