Simple object with function encode/decode, serialization/deserialization