BaseJSONImporter

Import any fsp_config_foundation.data_model.ConfigModel subclass from a schema-annotated JSON file.

Applies the normalization pipeline before Pydantic validation: metadata stripping, value-wrapper unboxing, hex-string coercion, scalar-to-list coercion, and id:Name reference resolution.

This is the primary entry point for importing schema-annotated JSON files when the model type and file path are known up front: instance = BaseJSONImporter(MyConfig, "config.json").import_data()

Member Functions:

import_data

import_data()

Load, normalize, and validate the JSON file as model_type.

Returns

T

Raises:

  • FileNotFoundError — If file_path does not exist.

  • json.JSONDecodeError — If the file is not valid JSON.

  • pydantic.ValidationError — If the normalized data fails model validation.

  • ValueError — If an id:Name reference cannot be resolved.