Fix - Custom objects cannot be serialized in JSON

Custom objects cannot be serialized in JSON, convert tasks into list before serializing.
Merge pull request #539 from bbuchacher/master

Fix - Custom objects cannot be serialized in JSON