Add serialize_hex method to do string conversion for serializations