serialize of task and interval to json format for d3 heatmap