Convert the scanner to JSON.

        Returns
        -------
        `dict`
            JSON data.

def save(self):
        """Convert the scanner to JSON.

        Returns
        -------
        `dict`
            JSON data.
        """
        data = super().save()
        data['expr'] = self.expr.pattern
        data['default_end'] = self.default_end
        return data