Use one method to serialize them all