Support custom type (userType) decoding

Hi,

I have add support for decoding custom type (or User defined type). This probably not very clean but it's a starting point.