Serialization and deserialization with generic accesor tested and working