Au format JSON
Lors de la sérialisation d'une durée en JSON, elle est représentée par une chaîne au format ISO 8601.
javascript
JSON.stringify({
postDuration: dayjs.duration(5, 'm'),
}); // '{"postDuration":"PT5M"}'