add toJSON to TaskObject