<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_json(self, extras=None):
 """ Convert a model into a json using the playhouse shortcut. """

        extras = extras or {}
        to_dict = model_to_dict(self)
        to_dict.update(extras)
        return json.dumps(to_dict, cls=sel.serializers.JsonEncoder)