def to_python(self, value):
        """Convert our string value to JSON after we load it from the DB"""
        if not value:
            return dict()
        try:
            if (isinstance(value, basestring) or
                    type(value) is unicode):
                return json.loads(value)
        except __HOLE__:
            return dict()
        return value
dataset/ETHPy150Open mozilla/django-badger/badger/models.py/JSONField.to_python