def validate(self, value, model_instance):
        super(JSONField, self).validate(value, model_instance)
        try:
            json.dumps(value)
        except __HOLE__:
            raise exceptions.ValidationError(
                self.error_messages['invalid'],
                code='invalid',
                params={'value': value},
            )
dataset/ETHPy150Open django/django/django/contrib/postgres/fields/jsonb.py/JSONField.validate