def default(self, obj):
        # QuerySet
        if isinstance(obj, QuerySet):
            return json.loads(serialize('json', obj))

        # Model
        if isinstance(obj, models.Model):
            return json.loads(serialize('json', [obj]))[0]

        # Promise (e.g., ``ugettext_lazy``), and Decimal both get unicoded
        if isinstance(obj, (Promise, decimal.Decimal)):
            return force_unicode(obj)

        # datetime, time, and date get isoformatted and unicoded
        if isinstance(obj, (datetime, time, date)):
            return unicode(obj.isoformat())

        return super(RobustEncoder, self).default(obj)
Provides custom functionality for certain types, defaulting to the
dataset/ETHPy150Open orokusaki/django-jsonrpc-2-0/jsonrpc/encoders.py/RobustEncoder.default