restapi.models.schema.PartialSchema.loads
- PartialSchema.loads(json_data, *, many=None, partial=None, unknown=None, **kwargs)
Same as
load(), except it takes a JSON string as input.- Parameters:
json_data (
str) – A JSON string of the data to deserialize.many (
bool|None, default:None) – Whether to deserialize obj as a collection. If None, the value for self.many is used.partial (
Union[bool,Sequence[str],AbstractSet[str],None], default:None) – Whether to ignore missing fields and not require any fields declared. Propagates down toNestedfields as well. If its value is an iterable, only missing fields listed in that iterable will be ignored. Use dot delimiters to specify nested fields.unknown (
str|None, default:None) – Whether to exclude, include, or raise an error for unknown fields in the data. Use EXCLUDE, INCLUDE or RAISE. If None, the value for self.unknown is used.
- Returns:
Deserialized data
Added in version 1.0.0.
Changed in version 3.0.0b7: This method returns the deserialized data rather than a
(data, errors)duple. AValidationErroris raised if invalid data are passed.