#NEWLINE# def load_jsonfile( pkg ) : #NEWLINE# #INDENT# data = None #NEWLINE# jsonFilepath = '/' . join ( [ 'Packages' , 'R-Box' , 'packages' , ( '%s.json' % jsonFilepath ) ] ) #NEWLINE# try : #NEWLINE# #INDENT# data = json . loads ( sublime . load_resource ( jsonFilepath ) ) #NEWLINE# #UNINDENT# except IOError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# if data : #NEWLINE# #INDENT# return data #NEWLINE# #UNINDENT# jsonFilepath = os . path . join ( sublime . packages_path ( ) , 'User' , 'R-Box' , 'packages' , ( '%s.json' % pkg ) ) #NEWLINE# if os . path . exists ( jsonFilepath ) : #NEWLINE# #INDENT# with open ( jsonFilepath , 'r' ) as f : #NEWLINE# #INDENT# data = json . load ( f ) #NEWLINE# #UNINDENT# #UNINDENT# return data