#NEWLINE# def to_json( self ) : #NEWLINE# #INDENT# 'Convert a message into JSON for sending to a sibling cell.' #NEWLINE# _dict = self . _to_dict ( ) #NEWLINE# _dict [ 'ctxt' ] = _dict [ 'ctxt' ] . to_dict ( ) #NEWLINE# method_kwargs = _dict [ 'method_kwargs' ] #NEWLINE# for ( k , v ) in method_kwargs . items ( ) : #NEWLINE# #INDENT# method_kwargs [ k ] = self . serializer . serialize_entity ( self . ctxt , v ) #NEWLINE# #UNINDENT# return jsonutils . dumps ( _dict )