a reviver function for JSON.parse that automatically creates Date objects from date strings