'ST2/ST3-compatible wrapper for getting the project data for a window as a dictionary, made possible with
titoBouzout\'s getProjectFile method in SideBarEnhancements (refactored to project_data)'

def project_data(self):

    window = sublime.active_window()
    if (not window):
        return
    if hasattr(window, u'project_data'):
        return window.project_data()
    project_file_name = self.project_file_name()
    if (not project_file_name):
        return
    try:
        with open(project_file_name) as fp:
            return json.load(fp, strict=False)
    except IOError:
        pass
