'Returns an HQLdesign from the serialized form'

@staticmethod
def loads(data):

    dic = json.loads(data)
    dic = dict(map((lambda k: (str(k), dic.get(k))), dic.keys()))
    if (dic['VERSION'] != SERIALIZATION_VERSION):
        LOG.error(('Design    version    mismatch.    Found    %s;    expect    %s' % (dic['VERSION'], SERIALIZATION_VERSION)))
    del dic['VERSION']
    if (('type' not in dic['query']) or (dic['query']['type'] is None)):
        dic['query']['type'] = 0
    if ('database' not in dic['query']):
        dic['query']['database'] = 'default'
    design = HQLdesign()
    design._data_dict = dic
    return design
