Serialize output