Automatic serialize object.