#NEWLINE# def from_json( self , filename , silent = False ) : #NEWLINE# #INDENT# 'Updates the values in the config from a JSON file. This function\n        behaves as if the JSON object was a dictionary and passed to the\n        :meth:`from_mapping` function.\n\n        :param filename: the filename of the JSON file.  This can either be an\n                         absolute filename or a filename relative to the\n                         root path.\n        :param silent: set to ``True`` if you want silent failure for missing\n                       files.\n\n        .. versionadded:: 1.0\n        ' #NEWLINE# filename = os . path . join ( self . root_path , filename ) #NEWLINE# try : #NEWLINE# #INDENT# with open ( filename ) as json_file : #NEWLINE# #INDENT# obj = json . loads ( json_file . read ( ) ) #NEWLINE# #UNINDENT# #UNINDENT# except IOError as e : #NEWLINE# #INDENT# if ( silent and ( e . errno in ( errno . ENOENT , errno . EISDIR ) ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# e . strerror = ( 'Unable to load configuration file (%s)' % e . strerror ) #NEWLINE# raise #NEWLINE# #UNINDENT# return self . from_mapping ( obj )