implement data object serialize and deserialize