Serialize as JSON for 'application/json' payloads