<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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