Typed nils which are the result of a type decoding hook seem to result in incorrect decoding behavior. Specifically, the nil is turned into an actual value due to the way the nil check works, instead of preserving the nil. Previously we were returning just untyped nils but ever since https://github.com/mitchellh/mapstructure/pull/205 this seems to no longer be supported while chaining multiple hooks.
I've added a test which reproduces this issue, and a possible fix.
Typed
nil
s which are the result of a type decoding hook seem to result in incorrect decoding behavior. Specifically, thenil
is turned into an actual value due to the way thenil
check works, instead of preserving thenil
. Previously we were returning just untypednil
s but ever since https://github.com/mitchellh/mapstructure/pull/205 this seems to no longer be supported while chaining multiple hooks.I've added a test which reproduces this issue, and a possible fix.
cc @mitchellh