import/Task.js
/**
     * Represent the task as JSON, including some properties that are otherwise
     * private or invisible.
     * @returns {object}
     */
Represent the task as JSON, including some properties that are otherwise
private or invisible.
@returns {object}
Represent the task as JSON including some properties that are otherwise private or invisible . @returns { object }
toJSON()
    {
        return {
            id           : this.id,
            position     : this.position,
            total        : this.total,
            progress     : this.progress,
            upTime       : this.upTime,
            remainingTime: this.remainingTime,
            started      : this.startTime > 0,
            ended        : this.endTime > 0,
            error        : this.error
        };
    }
toJSON ( ) { return { id : this . id , position : this . position , total : this . total , progress : this . progress , upTime : this . upTime , remainingTime : this . remainingTime , started : this . startTime > 0 , ended : this . endTime > 0 , error : this . error } ; }
Represent the task as JSON, including some properties that are otherwise
 private or invisible.
Represent the task as JSON including some properties that are otherwise private or invisible .