def route(self, pattern, **kwargs):
        def _decorated(func):
            self.add_route(pattern, func, **kwargs)
            return func
        return _decorated
Ensure to_dict correctly encodes callbacks.
dataset/ETHPy150Open benoitc/dj-webmachine/webmachine/route.py/WM.route--crossover with--dataset/ETHPy150Open Workiva/furious/furious/tests/test_async.py/TestAsync.test_to_dict_with_callbacks