Refactored converting objects to strings and parsing them back.