def load_jsonfile(pkg):
    data = None

    jsonFilepath = "/".join(['Packages', 'R-Box', 'packages', '%s.json' % pkg])
    try:
        data = json.loads(sublime.load_resource(jsonFilepath))
    except __HOLE__:
        pass

    if data:
        return data

    jsonFilepath = os.path.join(sublime.packages_path(), "User",
                                'R-Box', 'packages', '%s.json' % pkg)
    if os.path.exists(jsonFilepath):
        with open(jsonFilepath, "r") as f:
            data = json.load(f)

    return data
dataset/ETHPy150Open randy3k/R-Box/completions.py/load_jsonfile