serialize tasks as json