#NEWLINE# def json_load( path , encoding = 'utf-8' , **kwargs ) : #NEWLINE# #INDENT# ' Return data of a json file\n\n    Handles compression like gzip ' #NEWLINE# if ( path . split ( os . path . extsep ) [ ( - 1 ) ] == 'gz' ) : #NEWLINE# #INDENT# f = gzip . open ( path ) #NEWLINE# s = f . read ( ) . decode ( encoding ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# f = open ( path ) #NEWLINE# s = f . read ( ) #NEWLINE# #UNINDENT# data = json . loads ( s ) #NEWLINE# f . close ( ) #NEWLINE# return data