JsonDecoder's `orElse` and `map` do not defer `unsafeDecodeMissing` to `self`
Kalin-Rudnicki opened this issue · 2 comments
Kalin-Rudnicki commented
- Is this a deliberate decision, or just was not thought of?
- I see there is this
suspend
function, which will at least defer onunsafeDecodeMissing
, but then as soon as you map that, its lost. - Also, for example, the decoder for
Option
overridesmap
to defer onunsafeDecodeMissing
, but if you were tomap
a second time, it would be lost. - The only reason I can think not to do this would possibly be performance reasons, but that seems like a really trivial thing, and can imagine it will cause way more problems than its worth.
If it is the case that it is desirable to change this behavior, and defer to self
, I would be interested in making a first contribution to change this.
fsvehla commented
Seems to have been an oversight. Happy to review your PR :)
Kalin-Rudnicki commented
Just put up a PR for this