Closed lejard-h closed 6 years ago
same for const Field(dontEncode: true, dontDecode: true)
;
this should work.
final map = { 'date': new DateTime() };
final obj = serializer.fromMap(map);
dontEncode
and dontDecode
mean ignore while encoding and ignore while decoding, respectively. They don't mean "just pass as it is".
Should there be a PassAllProcessor
?
DynamicProcessor
processes dynamic
fields by default, if no processor is set on it. It is supposed to only parse valid fields.
Please reopen, if it is still an issue.
Yes it is an issue, for example, firebase provide partially decoded object with Datetime, like the example I provide
Would a PassAllProcessor
fit the need?
Something like that I guess
Would you like to write the pull request?
I don't use firebase. It is probably easier for you to test that it works with firebase as well.
It won't be possible sorry, passing my test below is enough, it should work with any object
Use PassProcessor
by default for dynamic
fields
Dynamic processor should let pass everything
Iterable, DateTime, Object ...
The goal is to tell the serializer to not process the field.