marshmalling.Unmarshaller ignoring None data
See original GitHub issuemarshmalling.Unmarshaller
seems to ignore None
data and don’t try to validate passed data, even if there is required fields.
What the point having a validation library if we have to validate ourselves the “basic” case of None
data?
Just asking the question, because it really doesn’t seems logical to me (and because I had to handle myself this issue in my own code…)
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
java - JAXB unmarshalling ignoring namespace turns element ...
I've attempted numerous ways of specifying it in the XSD but none of the permutations seem to work. I also attempted to unmarshal...
Read more >Marshalling (computer science) - Wikipedia
An unmarshalling interface takes a serialized object and transforms it into an internal data structure. The accurate definition of marshalling differs across ...
Read more >JAXB - Apache Camel
JAXB is a Data Format which uses the JAXB2 XML marshalling standard to unmarshal an ... To ignore non xml characheters and replace...
Read more >Encoding Infinispan caches and marshalling data
For clustered embedded caches, Infinispan needs to marshall any POJOs to a byte array that can be replicated between nodes and then unmarshalled...
Read more >JAXB / MOXy - not unmarshalling values after ignored elements
I'm working on a JAXB/MOXy XML parsing implementation using EclipseLink v2.1.3 (old, I know but we're still tied to Java 5) and I've ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Schema#load
andSchema#validate
responsibility is to validate dict data, by default.None
,False
, numbers, as well as arbitrary complex objects, are outside their API boundary.As mentioned above, you can use
pre_load
to preprocess inputs before they are validated.There’s this section of the docs: https://marshmallow.readthedocs.org/en/latest/quickstart.html#deserializing-objects-loading
The API ref for
load
also specifies that thedata
argument is adict
: https://marshmallow.readthedocs.org/en/latest/api_reference.html#marshmallow.Schema.load .I welcome any suggestions for making this clearer. Send a PR if you’re feeling generous! =)