Add a method to turn objects back to data dictionaries.