parameters: (cluster,
                   target: Tuple[str, Optional[str]] = ('mon', ''),
                   prefix: Optional[str] = None,
                   argdict: Optional[ValidatedArgs] = None,
                   inbuf: Optional[bytes] = b'',
                   timeout: Optional[int] = 0,
                   verbose: Optional[bool] = False)
return_statement: return ret, outbuf, outs
docstring: Serialize a command and up a JSON command and send it with send_command() above.
      Prefix may be supplied separately or in argdict.  Any bulk input
      data comes in inbuf.
  
      If target is osd.N, send command to that osd (except for pgid cmds)
  
      :param cluster: ``rados.Rados`` instance
      :param prefix: String to inject into command arguments as 'prefix'
      :param argdict: Command arguments
docstring_summary: Serialize a command and up a JSON command and send it with send_command() above.
      Prefix may be supplied separately or in argdict.  Any bulk input
      data comes in inbuf.
docstring_tokens: Serialize a command and up a JSON command and send it with send_command () above . Prefix may be supplied separately or in argdict . Any bulk input data comes in inbuf .
function: def json_command(cluster,
                   target: Tuple[str, Optional[str]] = ('mon', ''),
                   prefix: Optional[str] = None,
                   argdict: Optional[ValidatedArgs] = None,
                   inbuf: Optional[bytes] = b'',
                   timeout: Optional[int] = 0,
                   verbose: Optional[bool] = False) -> Tuple[int, bytes, str]:
      """
      Serialize a command and up a JSON command and send it with send_command() above.
      Prefix may be supplied separately or in argdict.  Any bulk input
      data comes in inbuf.
  
      If target is osd.N, send command to that osd (except for pgid cmds)
  
      :param cluster: ``rados.Rados`` instance
      :param prefix: String to inject into command arguments as 'prefix'
      :param argdict: Command arguments
      """
      cmddict: ValidatedArgs = {}
      if prefix:
          cmddict.update({'prefix': prefix})
  
      if argdict:
          cmddict.update(argdict)
          if 'target' in argdict:
              target = cast(Tuple[str, str], argdict['target'])
  
      try:
          if target[0] == 'osd':
              osdtarg = CephName()
              osdtarget = '{0}.{1}'.format(*target)
              # prefer target from cmddict if present and valid
              if 'target' in cmddict:
                  osdtarget = cast(str, cmddict.pop('target'))
              try:
                  osdtarg.valid(osdtarget)
                  target = ('osd', osdtarg.nameid)
              except:
                  # use the target we were originally given
                  pass
          ret, outbuf, outs = send_command_retry(cluster,
                                                 target, json.dumps(cmddict),
                                                 inbuf, timeout, verbose)
  
      except Exception as e:
          if not isinstance(e, ArgumentError):
              raise RuntimeError('"{0}": exception {1}'.format(argdict, e))
          else:
              raise
  
      return ret, outbuf, outs
function_tokens: def json_command ( cluster , target : Tuple [ str , Optional [ str ] ] = ( 'mon' , '' ) , prefix : Optional [ str ] = None , argdict : Optional [ ValidatedArgs ] = None , inbuf : Optional [ bytes ] = b'' , timeout : Optional [ int ] = 0 , verbose : Optional [ bool ] = False ) -> Tuple [ int , bytes , str ] : cmddict : ValidatedArgs = { } if prefix : cmddict . update ( { 'prefix' : prefix } ) if argdict : cmddict . update ( argdict ) if 'target' in argdict : target = cast ( Tuple [ str , str ] , argdict [ 'target' ] ) try : if target [ 0 ] == 'osd' : osdtarg = CephName ( ) osdtarget = '{0}.{1}' . format ( * target ) # prefer target from cmddict if present and valid if 'target' in cmddict : osdtarget = cast ( str , cmddict . pop ( 'target' ) ) try : osdtarg . valid ( osdtarget ) target = ( 'osd' , osdtarg . nameid ) except : # use the target we were originally given pass ret , outbuf , outs = send_command_retry ( cluster , target , json . dumps ( cmddict ) , inbuf , timeout , verbose ) except Exception as e : if not isinstance ( e , ArgumentError ) : raise RuntimeError ( '"{0}": exception {1}' . format ( argdict , e ) ) else : raise return ret , outbuf , outs