Splitting fetching of the serialization format in its own method