marshmallow-code / marshmallow-code/marshmallow
unknown parameter passed to load method is not popagated to nested schema field.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.2k
- Forks
- 738
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 7
Description
Current behavior
When we deserialize a data structure containing a nested data structure by using the load method, the unknown parameter is without effect on the nested data structure and a error is raised if an unknown field is present into the nested data structure
Expected behavior:
unknown parameter into load method is propagated to the the load of all nested data structure.
Functional context:
when processing a REST call in a server, it is often useful to be able to ignore unknown fields in the json provided during the deserialization process. This does not mean that we want these fields to be ignored in all contexts. The use of the unknown parameter of the load method allows this use case. Unfortunately, it does not apply to the nested field.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the Python load method handling for a schema containing a nested data structure, then inspect existing tests for nested deserialization and the unknown option. Reproduce the reported error with an unknown nested field; done means the chosen unknown behavior is propagated to nested loads without changing unrelated contexts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100