def parse_xcodeproject_plist(text, dictionarytype=dict, parsertype='normal'):
    text = unistr(text)

    if parsertype in ['normal', 'fast']:
        # Try the JSON based plist parser first
        root, parseinfo = parse_xcodeproject_plist_via_json(text)
        if root is not None or parsertype == 'fast':
            return root, parseinfo

    if parsertype in ['normal', 'classic']:
        # If the faster JSON based plist parser failed for whatever reason we try again
        # with the classic parser which has error reporting about where the parse failed.
        root, parseinfo = parse_xcodeproject_plist_direct(text, dictionarytype=dictionarytype)
        if root is not None and parsertype == 'normal':
            # The JSON parser failed after rewriting the plist syntax
            # but the plist parser succeeded. This is strance and we register this.
            parseinfo.setdefault('warnings', []).append('Warning: the fast xcode parser failed where the classic parser succeeded.'
                                                        ' This should not happen and it would be helpful if you could report this project file.')
        return root, parseinfo
    else:
        raise ValueError("Unknown parsertype: %s" % parsertype)
dataset/ETHPy150Open mikr/xcodeprojer/xcodeprojer.py/parse_xcodeproject_plist/original