'Converts JSON into an element tree
@param source: the JSON source
@param format: name of the XML root element'

@classmethod
def json2tree(cls, source, format=None):

    try:
        root_dict = json.load(source)
    except (ValueError,):
        e = sys.exc_info()[1]
        raise HTTP(400, body=cls.json_message(False, 400, e))
    native = False
    if (not format):
        format = cls.TAG.root
        native = True
    if (root_dict and isinstance(root_dict, dict)):
        root = cls.__obj2element(format, root_dict, native=native)
        if (root is not None):
            return etree.ElementTree(root)
    return None
