#NEWLINE# def prepare( self , strict = True ) : #NEWLINE# #INDENT# ' preparation for loaded json\n\n        :param bool strict: when in strict mode, exception would be raised if not valid.\n        ' #NEWLINE# self . validate ( strict = strict ) #NEWLINE# self . __root = self . prepare_obj ( self . raw , tr . __url ) #NEWLINE# if ( hasattr ( self . __root , 'schemes' ) and self . __root . schemes ) : #NEWLINE# #INDENT# if ( len ( self . __root . schemes ) > 0 ) : #NEWLINE# #INDENT# self . __schemes = self . __root . schemes #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . __schemes = [ six . moves . urlparse ( self . __url ) . schemes ] #NEWLINE# #UNINDENT# #UNINDENT# s = Scanner ( self ) #NEWLINE# s . scan ( root = self . __root , route = [ Merge ( ) ] ) #NEWLINE# s . scan ( root = self . __root , route = [ PatchObject ( ) ] ) #NEWLINE# s . scan ( root = self . __root , route = [ Aggregate ( ) ] ) #NEWLINE# tr = TypeReduce ( self . __sep ) #NEWLINE# cy = CycleDetector ( ) #NEWLINE# s . scan ( root = self . __root , route = [ tr , cy ] ) #NEWLINE# self . __op = utils . ScopeDict ( tr . op ) #NEWLINE# if ( hasattr ( self . __root , 'definitions' ) and ( self . __root . definitions != None ) ) : #NEWLINE# #INDENT# self . __m = utils . ScopeDict ( self . __root . definitions ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . __m = utils . ScopeDict ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# self . __m . sep = self . __sep #NEWLINE# self . __op . sep = self . __sep #NEWLINE# if ( ( len ( cy . cycles [ 'schema' ] ) > 0 ) and strict ) : #NEWLINE# #INDENT# raise errs . CycleDetectionError ( 'Cycles detected in Schema Object: {0}' . format ( cy . cycles [ 'schema' ] ) )