With the _metadata method on all main remote classes exporting JSONable data which File will embed, an import_metadata(Class, json_data) should exist to perfectly recreate a class instance.
_metadata
remote
File
import_metadata(Class, json_data)