def get_prep_value(self, value):
        """Convert value to JSON string before save"""
        try:
            return json.dumps(value, cls=DjangoJSONEncoder)
        except Exception as e:
            raise ValidationError(str(e))