Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The toJSON() method of Temporal.Duration instances returns a string representing this duration in the same ISO 8601 format as calling toString(). It is intended to be implicitly called by JSON.stringify().