Serializing data from the server