model_validate_json

classmethod CorrectBaselineAverage.model_validate_json(json_data: str | bytes | bytearray, *, strict: bool | None = None, context: dict[str, Any] | None = None) Model

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Args:

json_data: The JSON data to validate. strict: Whether to enforce types strictly. context: Extra variables to pass to the validator.

Returns:

The validated Pydantic model.

Raises:

ValueError: If json_data is not a JSON string.