#NEWLINE# def to_json( self ) : #NEWLINE# #INDENT# 'Inherit doc.' #NEWLINE# cursor = self . _cursor #NEWLINE# if ( self . _query is not None ) : #NEWLINE# #INDENT# if isinstance ( self . _query , db . Query ) : #NEWLINE# #INDENT# cursor = self . _query . cursor ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# cursor = self . _query . cursor_after ( ) #NEWLINE# #UNINDENT# #UNINDENT# if ( ( cursor is None ) or isinstance ( cursor , basestring ) ) : #NEWLINE# #INDENT# cursor_object = False #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# cursor_object = True #NEWLINE# cursor = cursor . to_websafe_string ( ) #NEWLINE# #UNINDENT# return { #NEWLINE# #INDENT# 'property_range' : self . _property_range . to_json ( ) , #NEWLINE# 'query_spec' : self . _query_spec . to_json ( ) , #NEWLINE# 'cursor' : cursor , #NEWLINE# 'ns_range' : self . _ns_range . to_json_object ( ) , #NEWLINE# 'name' : self . __class__ . __name__ , #NEWLINE# 'cursor_object' : cursor_object , #NEWLINE# #UNINDENT# }