title: return output in JSON format
body: <p>I need to get the put of the below code in JSON with out put and request success and request ID.</p>
  <pre><code># initialize the SSH client
  client = paramiko.SSHClient()
  # add to known hosts
  client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  try:
      client.connect(hostname=json_data[&quot;hostname&quot;], username=json_data[&quot;username&quot;], password=json_data[&quot;password&quot;])
  except:
      print(&quot;[!] Cannot connect to the SSH Server&quot;)
      exit()
  
  # execute the commands
  for command in commands:
      #print(&quot;=&quot;*50, command, &quot;=&quot;*50)
      stdin, stdout, stderr = client.exec_command(command)
      print (stdout.read().decode())
      err = stderr.read().decode()
      if err:
          print(err)
  </code></pre>
  <p>I tried below samples but did not help</p>
  <pre><code>json.load ((stdout.read().decode())
  </code></pre>