Decode the given value into the given target type. Behavior is undefined if T is not equal to or a superclass of target.