def validate(self, value, model_instance):
        if isinstance(value, six.string_types):
            super(JSONField, self).validate(value, model_instance)
            try:
                json.loads(value)
            except Exception as e:
                raise ValidationError(str(e))
Check value is a valid JSON string, raise ValidationError on
dataset/ETHPy150Open pennersr/django-allauth/allauth/socialaccount/fields.py/JSONField.validate