def _as_json(self, data, status_code = 200, default=None, *args, **kwargs):
        """Render the returned dictionary as a JSON object. Accepts the json.dumps `default` argument for a custom encoder."""
        import json
        if self._is_ajax and 'mimetype' not in kwargs:
            kwargs['mimetype'] = 'application/json'
        self._template_context = data
        response = self.__wrap_after_filter(json.dumps, self._template_context, default=default)
        if (str, unicode, SafeUnicode) in type(response):
            return self.__wrapped_print(response, status_code=status_code, *args, **kwargs)
        else:
            return response
dataset/ETHPy150Open zeraien/django-url-framework/django_url_framework/controller.py/ActionController._as_json/swapped operands of `in`