<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, propval, extraneous=False, to_json_func=None):
 """This function calls the ``json_out`` function, if it was specified, otherwise continues with JSON conversion of the value in the slot by calling ``to_json_func`` on it. """

        if self.json_out:
            return self.json_out(propval)
        else:
            if not to_json_func:
                from normalize.record.json import to_json
                to_json_func = to_json
            return to_json_func(propval, extraneous)