This is now part of Mp3tag v3.21b as a new function SayDuration which is not limited to JSON-handling, but can also be used in other contexts.
It takes the current input, interprets it as a numerical value and outputs a formatted duration string. It assumes to get the input in seconds, but can be switched to milliseconds via the optional second parameter "ms"
SayDuration "ms"