HSGPBase.model_validate_json#

classmethod HSGPBase.model_validate_json(json_data, *, strict=None, context=None, by_alias=None, by_name=None)#
!!! abstract “Usage Documentation”

[JSON Parsing](../concepts/json.md#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. by_alias: Whether to use the field’s alias when validating against the provided input data. by_name: Whether to use the field’s name when validating against the provided input data.

Returns:

The validated Pydantic model.

Raises:

ValidationError: If json_data is not a JSON string or the object could not be validated.