Open dairiki opened 2 years ago
I'm ok with that ! Maybe load_to_dict
is clearer than load_to_mapping
? Doesn't it always return a dict ?
I'm ok with that ! Maybe
load_to_dict
is clearer thanload_to_mapping
? Doesn't it always return a dict ?
Yes, that's probably better.
After some digging through the marshmallow source code it appears to always return dict (or OrderedDict) (or a list of those if many
is set). I will rename it.
Following up on this suggestion made in a comment on #169 (see also #210), this provides a new schema method,
.load_to_mapping
, that essentially does a rawmarshmallow.Schema.load
without converting any of the deserialized values (either top-level or nested) to dataclasses. The main point of this is to allow for deserializing partial data (withpartial=True
).This PR is provided for discussion, as to: