Format as JSON when it s not running on terminal