def to_python(self, value):
    'Convert our string value to JSON after we load it from the DB'
    if ((value is None) or (value == '')):
        return {}
    elif isinstance(value, basestring):
        res = loads(value)
        if isinstance(res, dict):
            return JSONDict(**res)
        else:
            return JSONList(res)
    else:
        return value
Convert our string value to JSON after we load it from the DB
def to_python(self, value):
    
    if ((value is None) or (value == )):
        return {}
    elif isinstance(value, basestring):
        res = loads(value)
        if isinstance(res, dict):
            return JSONDict(**res)
        else:
            return JSONList(res)
    else:
        return value