Use Marshal and Unmarshal instead of Encode and Decode.