marshmallow-code/marshmallow

Allow specifying output field when using `unknown=INCLUDE`

Open

#853 ouverte le 23 juin 2018

Voir sur GitHub
 (3 commentaires) (4 réactions) (0 assignés)Python (640 forks)batch import
feedback welcomehelp wanted

Métriques du dépôt

Stars
 (6 787 stars)
Métriques de merge PR
 (Merge moyen 4h 13m) (6 PRs mergées en 30 j)

Description

From https://github.com/marshmallow-code/marshmallow/issues/524#issuecomment-393057138

We could even go further and let the user set a default Field when using INCLUDE, but I'm not sure it is so useful, and it is never too late to add it in a later step.

(edited to make the argument name correct)

I suggested here that a field could be passed to unknown, e.g. unknown=fields.Str().

Guide contributeur