Use #tap to pass the duration value to the JSON formatter