def value_to_string(self, obj):

        if hasattr(obj, self.attname):
            value = getattr(obj, self.attname)
        else:
            assert isinstance(obj, dict)
            value = obj.get(self.attname, "")

        return self._flatten_value(value)
Extract our value from the passed object and return it in string form
dataset/ETHPy150Open matthiask/plata/plata/fields.py/JSONField.value_to_string