complete serialize deserialize example.